diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index c6c710a67a..22476cae0a 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -2256,7 +2256,6 @@ 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) { @@ -2290,12 +2289,11 @@ void AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &S, CodeCompletionBuilder Builder(getAllocator(), getCodeCompletionTUInfo(), CCP_CodePattern, C->Availability); Builder.AddTypedTextChunk(C->Completion->getTypedText()); - CursorKind = CXCursor_NotImplemented; Priority = CCP_CodePattern; Completion = Builder.TakeString(); } - AllResults.push_back(Result(Completion, Priority, CursorKind, + AllResults.push_back(Result(Completion, Priority, C->Kind, C->Availability)); } diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index e065904271..1fc5d8f2ce 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -7168,7 +7168,9 @@ void Sema::CodeCompletePreprocessorMacroName(bool IsDefinition) { M != MEnd; ++M) { Builder.AddTypedTextChunk(Builder.getAllocator().CopyString( M->first->getName())); - Results.AddResult(Builder.TakeString()); + Results.AddResult(CodeCompletionResult(Builder.TakeString(), + CCP_CodePattern, + CXCursor_MacroDefinition)); } Results.ExitScope(); } else if (IsDefinition) { |