aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-25 18:03:13 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-25 18:03:13 +0000
commit4125c37c71c6c8475019497de837204f0ee4370f (patch)
tree6559f301cfc42a12fbbdac1cab87ea6782eb08ad /lib/Frontend/ASTUnit.cpp
parent938e5a1382049a7a53bf1c2277b37b82a8c12208 (diff)
Make the cursor kind of macro-name-only completions produced by
ASTUnit match those produced directly by code completion. Test case is forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r--lib/Frontend/ASTUnit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index a22761d649..16aa6e3cc0 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/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));
}