Dmitry Frank
2012-Nov-30 08:48 UTC
[LLVMdev] clang and libclang: one more code-completion missing feature
Hello. I guess I found one more missing feature in clang/libclang code-completion, it relates to functions with defaulted arguments. In the clang docs for clang API Documentation <http://goo.gl/UYOmL> there is one example: void f(int x, float y = 3.14, double z = 2.71828); The code-completion string for this function would contain: - a TypedText chunk for "f". - a LeftParen chunk for "(". - a Placeholder chunk for "int x" - an Optional chunk containing the remaining defaulted arguments, e.g., - a Comma chunk for "," - a Placeholder chunk for "float y" - an Optional chunk containing the last defaulted argument: - a Comma chunk for "," - a Placeholder chunk for "double z" - a RightParen chunk for ")" So, completion string does not contain actual default values for arguments. But I'm pretty sure this is important information, and it should be returned in completion string, and I would include it in the placeholder. I.e. placeholder for y argument should actually contain "float y = 3.14" , instead of just "float y" Please let me know if you agree or not. -- Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121130/645148ce/attachment.html>
Maybe Matching Threads
- [LLVMdev] Question on C++ code completion - function parameter list
- [LLVMdev] libclang parsing bug
- Is there a C++ API for libclang to have full access to the AST ?
- [LLVMdev] Linking Debug+Asserts Shared Library libclang.so: final link failed: Bad value
- [LLVMdev] libclang parsing bug