diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-25 18:03:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-25 18:03:13 +0000 |
commit | 8850aa3f67b7ef119cf22df548f1ebf3c3781ef9 (patch) | |
tree | 90d19352fd22f1fb9629259db958d4b0f07cd803 /clang/lib/Frontend/ASTUnit.cpp | |
parent | 9cd85d1c776ecc1c01cd8fd0f8cb1dad19b05fc0 (diff) | |
download | bcm5719-llvm-8850aa3f67b7ef119cf22df548f1ebf3c3781ef9.tar.gz bcm5719-llvm-8850aa3f67b7ef119cf22df548f1ebf3c3781ef9.zip |
Make the cursor kind of macro-name-only completions produced by
ASTUnit match those produced directly by code completion. Test case is
forthcoming.
llvm-svn: 112063
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index a22761d6498..16aa6e3cc01 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -1628,6 +1628,7 @@ void AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &S, // Adjust priority based on similar type classes. unsigned Priority = C->Priority; + CXCursorKind CursorKind = C->Kind; CodeCompletionString *Completion = C->Completion; if (!Context.getPreferredType().isNull()) { if (C->Kind == CXCursor_MacroDefinition) { @@ -1660,9 +1661,11 @@ void AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &S, Completion = new CodeCompletionString; Completion->AddTypedTextChunk(C->Completion->getTypedText()); StringsToDestroy.push_back(Completion); + CursorKind = CXCursor_NotImplemented; + Priority = CCP_CodePattern; } - AllResults.push_back(Result(Completion, Priority, C->Kind, + AllResults.push_back(Result(Completion, Priority, CursorKind, C->Availability)); } |