[cfe-commits] [PATCH] New libclang API function, clang_codeCompleteGetContexts

Connor Wakamo cwakamo at apple.com
Tue Jul 5 17:41:03 PDT 2011


Hello,

I have implemented a new API function for libclang, clang_codeCompleteGetContexts, that returns a bitfield with the various code completion result types that are valid for the current code completion.  (The values for this bitfield are defined in enum CXCompletionContext in include/clang-c/Index.h.)

In support of this change, I also added a few new values to enum CodeCompletionContext::Kind in include/clang/Sema/CodeCompleteConsumer.h to provide better information for certain Objective-C contexts that were previously included in the "Other" context kind.

I also c-index-test to provide this context information when run with the -code-completion-at option.  I also updated the tests in test/Index/code-completion.cpp and test/Index/complete-natural.m to test the new output.

Finally, I also updated tools/libclang/libclang.exports and tools/libclang/libclang.darwin.exports to reflect the added API.

As this is my first submission to Clang, please let me know if I've overlooked something or if I need to make additional changes.

Thanks,
Connor Wakamo
cwakamo at apple.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110705/0f8d902d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang_codeCompleteGetContexts.patch
Type: application/octet-stream
Size: 26074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110705/0f8d902d/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110705/0f8d902d/attachment-0001.html>


More information about the cfe-commits mailing list