[cfe-commits] r112063 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Douglas Gregor
dgregor at apple.com
Wed Aug 25 11:03:13 PDT 2010
Author: dgregor
Date: Wed Aug 25 13:03:13 2010
New Revision: 112063
URL: http://llvm.org/viewvc/llvm-project?rev=112063&view=rev
Log:
Make the cursor kind of macro-name-only completions produced by
ASTUnit match those produced directly by code completion. Test case is
forthcoming.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=112063&r1=112062&r2=112063&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Wed Aug 25 13:03:13 2010
@@ -1628,6 +1628,7 @@
// 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 @@
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));
}
More information about the cfe-commits
mailing list