Duc Nguyen
2012-Aug-16 10:44 UTC
[LLVMdev] Question on C++ code completion - function parameter list
Hello, Using c-index-test.exe I'm learning clang code completion for C++. I have an issue to get the current parameter list of a C++ function. While it works for a C function, I get nothing which can be evaluated in case of C++ function. I use the following command line: "c-index-test -code-completion-at=x.cpp:9:10 -x c++ -fsyntax-only -x.cpp" Where: - "9:10" is the line:column number just after the parenthesis behind the function name. If the function is a C function, "c-index-test" returns a function parameter list for the function with the node 'CurrentParameter' which is important for code completion: NotImplemented:{ResultType int}{Text geti}{LeftParen (}{CurrentParameter int i}{Comma , }{Text char c}{RightParen )} (1) But if I use the same command line asking for the C++ function parameter list, the expected result is not returned. Hereafter is the source code x.cpp: int geti(int i, char c) { return 1; } // C function class myclass { public: myclass() {} ~myclass() {} int func(int i, char c) { return 1; } void test() { func(//line and column number for code completion here, after the parenthesis } }; Could you please tell me, whether the command line to retrieve the parameter list for the C++ function differs from that in C? And, which command line would be appropriate? Thanks for any answer and tips. Duc -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120816/eee578e7/attachment.html>
Eric Christopher
2012-Aug-16 17:47 UTC
[LLVMdev] Question on C++ code completion - function parameter list
On Aug 16, 2012, at 3:44 AM, Duc Nguyen <Duc.Nguyen at arm.com> wrote:> Hello, > > Using c-index-test.exe I’m learning clang code completion for C++. > > > Could you please tell me, whether the command line to retrieve the parameter list for the C++ function differs from that in C? And, which command line would be appropriate?You should probably pose this question to cfe-dev at cs.uiuc.edu. -eric
Maybe Matching Threads
- [LLVMdev] clang and libclang: one more code-completion missing feature
- Custom Application For Asterisk
- [LLVMdev] selecting ISD node - help
- Compiler position at Kalray
- [LLVMdev] Unexpected spilling of vector register during lane extraction on some x86_64 targets