diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-26 15:24:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-26 15:24:30 +0000 |
commit | 0a47d69af8bda945352997af3da4687a3356096a (patch) | |
tree | 340e57a2b179434ab58d35e56c203ba85453d446 /include/clang/Sema/CodeCompleteConsumer.h | |
parent | 2ad63cf7146268a336b5a931f626adaa8a5150f0 (diff) |
Add new libclang API, clang_codeCompleteGetObjCSelector(), which
provides the partial Objective-C selector used in a code
completion. From Connor Wakamo!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r-- | include/clang/Sema/CodeCompleteConsumer.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index 9b5564853c..8c7a00280b 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -268,12 +268,23 @@ private: /// \brief The type of the base object in a member access expression. QualType BaseType; + /// \brief The identifiers for Objective-C selector parts. + IdentifierInfo **SelIdents; + + /// \brief The number of Objective-C selector parts. + unsigned NumSelIdents; + public: /// \brief Construct a new code-completion context of the given kind. - CodeCompletionContext(enum Kind Kind) : Kind(Kind) { } + CodeCompletionContext(enum Kind Kind) : Kind(Kind), SelIdents(NULL), + NumSelIdents(0) { } /// \brief Construct a new code-completion context of the given kind. - CodeCompletionContext(enum Kind Kind, QualType T) : Kind(Kind) { + CodeCompletionContext(enum Kind Kind, QualType T, + IdentifierInfo **SelIdents = NULL, + unsigned NumSelIdents = 0) : Kind(Kind), + SelIdents(SelIdents), + NumSelIdents(NumSelIdents) { if (Kind == CCC_DotMemberAccess || Kind == CCC_ArrowMemberAccess || Kind == CCC_ObjCPropertyAccess || Kind == CCC_ObjCClassMessage || Kind == CCC_ObjCInstanceMessage) @@ -293,6 +304,12 @@ public: /// \brief Retrieve the type of the base object in a member-access /// expression. QualType getBaseType() const { return BaseType; } + + /// \brief Retrieve the Objective-C selector identifiers. + IdentifierInfo **getSelIdents() const { return SelIdents; } + + /// \brief Retrieve the number of Objective-C selector identifiers. + unsigned getNumSelIdents() const { return NumSelIdents; } /// \brief Determines whether we want C++ constructors as results within this /// context. |