aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CIndexCodeCompletion.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
commit676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch)
tree02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /tools/libclang/CIndexCodeCompletion.cpp
parentc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff)
Diffstat (limited to 'tools/libclang/CIndexCodeCompletion.cpp')
-rw-r--r--tools/libclang/CIndexCodeCompletion.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/libclang/CIndexCodeCompletion.cpp b/tools/libclang/CIndexCodeCompletion.cpp
index f49f9763c362..c5cece52ac6b 100644
--- a/tools/libclang/CIndexCodeCompletion.cpp
+++ b/tools/libclang/CIndexCodeCompletion.cpp
@@ -26,7 +26,6 @@
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/CompilerInstance.h"
-#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "clang/Sema/Sema.h"
#include "llvm/ADT/SmallString.h"
@@ -487,7 +486,8 @@ static unsigned long long getContextsForContextKind(
contexts = CXCompletionContext_Namespace;
break;
}
- case CodeCompletionContext::CCC_PotentiallyQualifiedName: {
+ case CodeCompletionContext::CCC_SymbolOrNewName:
+ case CodeCompletionContext::CCC_Symbol: {
contexts = CXCompletionContext_NestedNameSpecifier;
break;
}
@@ -499,6 +499,10 @@ static unsigned long long getContextsForContextKind(
contexts = CXCompletionContext_NaturalLanguage;
break;
}
+ case CodeCompletionContext::CCC_IncludedFile: {
+ contexts = CXCompletionContext_IncludedFile;
+ break;
+ }
case CodeCompletionContext::CCC_SelectorName: {
contexts = CXCompletionContext_ObjCSelectorName;
break;
@@ -535,7 +539,7 @@ static unsigned long long getContextsForContextKind(
case CodeCompletionContext::CCC_Other:
case CodeCompletionContext::CCC_ObjCInterface:
case CodeCompletionContext::CCC_ObjCImplementation:
- case CodeCompletionContext::CCC_Name:
+ case CodeCompletionContext::CCC_NewName:
case CodeCompletionContext::CCC_MacroName:
case CodeCompletionContext::CCC_PreprocessorExpression:
case CodeCompletionContext::CCC_PreprocessorDirective:
@@ -653,7 +657,8 @@ namespace {
void ProcessOverloadCandidates(Sema &S, unsigned CurrentArg,
OverloadCandidate *Candidates,
- unsigned NumCandidates) override {
+ unsigned NumCandidates,
+ SourceLocation OpenParLoc) override {
StoredResults.reserve(StoredResults.size() + NumCandidates);
for (unsigned I = 0; I != NumCandidates; ++I) {
CodeCompletionString *StoredCompletion