aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/CodeCompleteConsumer.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-19 01:08:35 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-19 01:08:35 +0000
commitd3c6854153fd6bc6a412a29e4491dbd0a47bdb14 (patch)
tree6ebb79f2018d2e29f67e446809b9f094405de389 /include/clang/Sema/CodeCompleteConsumer.h
parent58588943a8283baf17815d56275bdb381560970c (diff)
Improve code completion for Objective-C message sends, so that we
provide completion results before each keyword argument, e.g., [foo Method:arg WithArg1:arg1 WithArg2:arg2] We now complete before "WithArg1" and before "WithArg2", in addition to completing before "Method". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index f8c4c5281c..3c5428bdb9 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -257,6 +257,10 @@ public:
/// result and progressively higher numbers representing poorer results.
unsigned Rank;
+ /// \brief Specifiers which parameter (of a function, Objective-C method,
+ /// macro, etc.) we should start with when formatting the result.
+ unsigned StartParameter;
+
/// \brief Whether this result is hidden by another name.
bool Hidden : 1;
@@ -277,26 +281,27 @@ public:
NestedNameSpecifier *Qualifier = 0,
bool QualifierIsInformative = false)
: Kind(RK_Declaration), Declaration(Declaration), Rank(Rank),
- Hidden(false), QualifierIsInformative(QualifierIsInformative),
+ StartParameter(0), Hidden(false),
+ QualifierIsInformative(QualifierIsInformative),
StartsNestedNameSpecifier(false), Qualifier(Qualifier) { }
/// \brief Build a result that refers to a keyword or symbol.
Result(const char *Keyword, unsigned Rank)
- : Kind(RK_Keyword), Keyword(Keyword), Rank(Rank), Hidden(false),
- QualifierIsInformative(0), StartsNestedNameSpecifier(false),
- Qualifier(0) { }
+ : Kind(RK_Keyword), Keyword(Keyword), Rank(Rank), StartParameter(0),
+ Hidden(false), QualifierIsInformative(0),
+ StartsNestedNameSpecifier(false), Qualifier(0) { }
/// \brief Build a result that refers to a macro.
Result(IdentifierInfo *Macro, unsigned Rank)
- : Kind(RK_Macro), Macro(Macro), Rank(Rank), Hidden(false),
- QualifierIsInformative(0), StartsNestedNameSpecifier(false),
- Qualifier(0) { }
+ : Kind(RK_Macro), Macro(Macro), Rank(Rank), StartParameter(0),
+ Hidden(false), QualifierIsInformative(0),
+ StartsNestedNameSpecifier(false), Qualifier(0) { }
/// \brief Build a result that refers to a pattern.
Result(CodeCompletionString *Pattern, unsigned Rank)
- : Kind(RK_Pattern), Pattern(Pattern), Rank(Rank), Hidden(false),
- QualifierIsInformative(0), StartsNestedNameSpecifier(false),
- Qualifier(0) { }
+ : Kind(RK_Pattern), Pattern(Pattern), Rank(Rank), StartParameter(0),
+ Hidden(false), QualifierIsInformative(0),
+ StartsNestedNameSpecifier(false), Qualifier(0) { }
/// \brief Retrieve the declaration stored in this result.
NamedDecl *getDeclaration() const {