Index: include/clang-c/Index.h =================================================================== --- include/clang-c/Index.h +++ include/clang-c/Index.h @@ -2276,7 +2276,12 @@ */ CXCursor_ModuleImportDecl = 600, CXCursor_FirstExtraDecl = CXCursor_ModuleImportDecl, - CXCursor_LastExtraDecl = CXCursor_ModuleImportDecl + CXCursor_LastExtraDecl = CXCursor_ModuleImportDecl, + + /** + * \brief A code completion overload candidate. + */ + CXCursor_OverloadCandidate = 700 }; /** Index: lib/Sema/SemaCodeComplete.cpp =================================================================== --- lib/Sema/SemaCodeComplete.cpp +++ lib/Sema/SemaCodeComplete.cpp @@ -3820,15 +3820,17 @@ if (!CodeCompleter) return; - // When we're code-completing for a call, we DON'T fall back to ordinary + // When we're code-completing for a call, we fall back to ordinary // name code-completion whenever we can't produce specific - // results. This will do "parameter completion" solely. + // results. We may want to revisit this strategy in the future, + // e.g., by merging the two kinds of results. Expr *Fn = (Expr *)FnIn; // Ignore type-dependent call expressions entirely. if (!Fn || Fn->isTypeDependent() || anyNullArguments(Args) || Expr::hasAnyTypeDependentArguments(Args)) { + CodeCompleteOrdinaryName(S, PCC_Expression); return; } @@ -3920,7 +3922,9 @@ /*PartialOverloading=*/true); } } - + + QualType ParamType; + if (!CandidateSet.empty()) { // Sort the overload candidate set by placing the best overloads first. std::stable_sort( @@ -3929,26 +3933,40 @@ return isBetterOverloadCandidate(*this, X, Y, Loc); }); - // Add the overload candidates as code-completion results. + // Add the remaining viable overload candidates as code-completion results. for (OverloadCandidateSet::iterator Cand = CandidateSet.begin(), CandEnd = CandidateSet.end(); Cand != CandEnd; ++Cand) { if (Cand->Viable || Cand->FailureKind == ovl_fail_too_many_arguments) Results.push_back(ResultCandidate(Cand->Function)); } + + // From the viable candidates, try to determine the type of this parameter. + for (unsigned I = 0, N = Results.size(); I != N; ++I) { + if (const FunctionType *FType = Results[I].getFunctionType()) + if (const FunctionProtoType *Proto = dyn_cast(FType)) + if (Args.size() < Proto->getNumParams()) { + if (ParamType.isNull()) + ParamType = Proto->getParamType(Args.size()); + else if (!Context.hasSameUnqualifiedType( + ParamType.getNonReferenceType(), + Proto->getParamType(Args.size()) + .getNonReferenceType())) { + ParamType = QualType(); + break; + } + } + } } - if (!Results.empty()) { - // An empty ResultBuilder solely to set CodeCompletionContext - ResultBuilder r(*this, CodeCompleter->getAllocator(), - CodeCompleter->getCodeCompletionTUInfo(), - mapCodeCompletionContext(*this, PCC_Expression)); - HandleCodeCompleteResults(this, CodeCompleter, r.getCompletionContext(), - r.data(), r.size()); + if (ParamType.isNull()) + CodeCompleteOrdinaryName(S, PCC_Expression); + else + CodeCompleteExpression(S, ParamType); + if (!Results.empty()) CodeCompleter->ProcessOverloadCandidates(*this, Args.size(), Results.data(), Results.size()); - } } void Sema::CodeCompleteConstructor(Scope *S, CXXRecordDecl *DC, @@ -3958,6 +3976,7 @@ // FIXME: Provide support for completing constructors of templates that are // being declared for the first time. + OverloadCandidateSet CandidateSet(Loc, OverloadCandidateSet::CSK_Normal); typedef CodeCompleteConsumer::OverloadCandidate ResultCandidate; @@ -3979,6 +3998,8 @@ } } + QualType ParamType; + if (!CandidateSet.empty()) { // Sort the overload candidate set by placing the best overloads first. std::stable_sort( @@ -3987,26 +4008,40 @@ return isBetterOverloadCandidate(*this, X, Y, Loc); }); - // Add the overload candidates as code-completion results. + // Add the remaining viable overload candidates as code-completion results. for (OverloadCandidateSet::iterator Cand = CandidateSet.begin(), CandEnd = CandidateSet.end(); Cand != CandEnd; ++Cand) { if (Cand->Viable || Cand->FailureKind == ovl_fail_too_many_arguments) Results.push_back(ResultCandidate(Cand->Function)); } + + // From the viable candidates, try to determine the type of this parameter. + for (unsigned I = 0, N = Results.size(); I != N; ++I) { + if (const FunctionType *FType = Results[I].getFunctionType()) + if (const FunctionProtoType *Proto = dyn_cast(FType)) + if (Args.size() < Proto->getNumParams()) { + if (ParamType.isNull()) + ParamType = Proto->getParamType(Args.size()); + else if (!Context.hasSameUnqualifiedType( + ParamType.getNonReferenceType(), + Proto->getParamType(Args.size()) + .getNonReferenceType())) { + ParamType = QualType(); + break; + } + } + } } - if (!Results.empty()) { - // An empty ResultBuilder solely to set CodeCompletionContext - ResultBuilder r(*this, CodeCompleter->getAllocator(), - CodeCompleter->getCodeCompletionTUInfo(), - mapCodeCompletionContext(*this, PCC_Expression)); - HandleCodeCompleteResults(this, CodeCompleter, r.getCompletionContext(), - r.data(), r.size()); + if (ParamType.isNull()) + CodeCompleteOrdinaryName(S, PCC_Expression); + else + CodeCompleteExpression(S, ParamType); + if (!Results.empty()) CodeCompleter->ProcessOverloadCandidates(*this, Args.size(), Results.data(), Results.size()); - } } void Sema::CodeCompleteInitializer(Scope *S, Decl *D) { Index: test/CodeCompletion/call.cpp =================================================================== --- test/CodeCompletion/call.cpp +++ test/CodeCompletion/call.cpp @@ -18,6 +18,7 @@ void test() { f(Y(), 0, 0); // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // CHECK-CC1: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>) // CHECK-CC1: f(N::Y y, <#int ZZ#>) // CHECK-CC1-NEXT: f(int i, <#int j#>, int k) // CHECK-CC1-NEXT: f(float x, <#float y#>) Index: test/Index/code-completion.cpp =================================================================== --- test/Index/code-completion.cpp +++ test/Index/code-completion.cpp @@ -58,9 +58,9 @@ // CHECK-MEMBER-NEXT: Container is complete // CHECK-MEMBER-NEXT: Container USR: c:@S@Z -// CHECK-OVERLOAD: NotImplemented:{ResultType int &}{Text overloaded}{LeftParen (}{Text Z z}{Comma , }{CurrentParameter int second}{RightParen )} -// CHECK-OVERLOAD: NotImplemented:{ResultType float &}{Text overloaded}{LeftParen (}{Text int i}{Comma , }{CurrentParameter long second}{RightParen )} -// CHECK-OVERLOAD: NotImplemented:{ResultType double &}{Text overloaded}{LeftParen (}{Text float f}{Comma , }{CurrentParameter int second}{RightParen )} +// CHECK-OVERLOAD: OverloadCandidate:{ResultType int &}{Text overloaded}{LeftParen (}{Text Z z}{Comma , }{CurrentParameter int second}{RightParen )} +// CHECK-OVERLOAD: OverloadCandidate:{ResultType float &}{Text overloaded}{LeftParen (}{Text int i}{Comma , }{CurrentParameter long second}{RightParen )} +// CHECK-OVERLOAD: OverloadCandidate:{ResultType double &}{Text overloaded}{LeftParen (}{Text float f}{Comma , }{CurrentParameter int second}{RightParen )} // CHECK-OVERLOAD: Completion contexts: // CHECK-OVERLOAD-NEXT: Any type // CHECK-OVERLOAD-NEXT: Any value Index: test/Index/complete-call.cpp =================================================================== --- test/Index/complete-call.cpp +++ test/Index/complete-call.cpp @@ -95,7 +95,7 @@ } // RUN: c-index-test -code-completion-at=%s:47:9 %s | FileCheck -check-prefix=CHECK-CC1 %s -// CHECK-CC1: NotImplemented:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) +// CHECK-CC1: OverloadCandidate:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) // CHECK-CC1: Completion contexts: // CHECK-CC1-NEXT: Any type // CHECK-CC1-NEXT: Any value @@ -107,8 +107,8 @@ // CHECK-CC1-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:48:9 %s | FileCheck -check-prefix=CHECK-CC2 %s -// CHECK-CC2: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter void *}{RightParen )} (1) -// CHECK-CC2: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC2: Completion contexts: // CHECK-CC2-NEXT: Any type // CHECK-CC2-NEXT: Any value @@ -120,8 +120,8 @@ // CHECK-CC2-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:49:9 %s | FileCheck -check-prefix=CHECK-CC3 %s -// CHECK-CC3: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) -// CHECK-CC3: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) // CHECK-CC3: Completion contexts: // CHECK-CC3-NEXT: Any type // CHECK-CC3-NEXT: Any value @@ -133,7 +133,7 @@ // CHECK-CC3-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:49:12 %s | FileCheck -check-prefix=CHECK-CC4 %s -// CHECK-CC4: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC4: Completion contexts: // CHECK-CC4-NEXT: Any type // CHECK-CC4-NEXT: Any value @@ -145,7 +145,7 @@ // CHECK-CC4-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:50:11 %s | FileCheck -check-prefix=CHECK-CC5 %s -// CHECK-CC5: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) // CHECK-CC5: Completion contexts: // CHECK-CC5-NEXT: Any type // CHECK-CC5-NEXT: Any value @@ -157,7 +157,7 @@ // CHECK-CC5-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:51:12 %s | FileCheck -check-prefix=CHECK-CC6 %s -// CHECK-CC6: NotImplemented:{ResultType void}{Text foo_4}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{ResultType void}{Text foo_4}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC6: Completion contexts: // CHECK-CC6-NEXT: Any type // CHECK-CC6-NEXT: Any value @@ -169,7 +169,7 @@ // CHECK-CC6-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:52:11 %s | FileCheck -check-prefix=CHECK-CC7 %s -// CHECK-CC7: NotImplemented:{ResultType void}{Text foo_4}{LeftParen (}{Text void *}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{ResultType void}{Text foo_4}{LeftParen (}{Text void *}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC7: Completion contexts: // CHECK-CC7-NEXT: Any type // CHECK-CC7-NEXT: Any value @@ -181,8 +181,8 @@ // CHECK-CC7-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:53:12 %s | FileCheck -check-prefix=CHECK-CC8 %s -// CHECK-CC8: NotImplemented:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) -// CHECK-CC8: NotImplemented:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC8: Completion contexts: // CHECK-CC8-NEXT: Any type // CHECK-CC8-NEXT: Any value @@ -194,7 +194,7 @@ // CHECK-CC8-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:54:14 %s | FileCheck -check-prefix=CHECK-CC9 %s -// CHECK-CC9: NotImplemented:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) // CHECK-CC9: Completion contexts: // CHECK-CC9-NEXT: Any type // CHECK-CC9-NEXT: Any value @@ -206,7 +206,7 @@ // CHECK-CC9-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:55:9 %s | FileCheck -check-prefix=CHECK-CC10 %s -// CHECK-CC10: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter T}{RightParen )} (1) +// CHECK-CC10: OverloadCandidate:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter T}{RightParen )} (1) // CHECK-CC10: Completion contexts: // CHECK-CC10-NEXT: Any type // CHECK-CC10-NEXT: Any value @@ -218,7 +218,7 @@ // CHECK-CC10-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:56:14 %s | FileCheck -check-prefix=CHECK-CC11 %s -// CHECK-CC11: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC11: OverloadCandidate:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC11: Completion contexts: // CHECK-CC11-NEXT: Any type // CHECK-CC11-NEXT: Any value @@ -230,7 +230,7 @@ // CHECK-CC11-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:57:12 %s | FileCheck -check-prefix=CHECK-CC12 %s -// CHECK-CC12: NotImplemented:{ResultType void}{Text foo_8}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC12: OverloadCandidate:{ResultType void}{Text foo_8}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC12: Completion contexts: // CHECK-CC12-NEXT: Any type // CHECK-CC12-NEXT: Any value @@ -242,7 +242,7 @@ // CHECK-CC12-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:58:12 %s | FileCheck -check-prefix=CHECK-CC13 %s -// CHECK-CC13: NotImplemented:{ResultType void}{Text foo_9}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{RightParen )} (1) +// CHECK-CC13: OverloadCandidate:{ResultType void}{Text foo_9}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{RightParen )} (1) // CHECK-CC13: Completion contexts: // CHECK-CC13-NEXT: Any type // CHECK-CC13-NEXT: Any value @@ -254,7 +254,7 @@ // CHECK-CC13-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:59:11 %s | FileCheck -check-prefix=CHECK-CC14 %s -// CHECK-CC14: NotImplemented:{ResultType void}{Text foo_9}{LeftParen (}{Text void *}{Comma , }{CurrentParameter T}{RightParen )} (1) +// CHECK-CC14: OverloadCandidate:{ResultType void}{Text foo_9}{LeftParen (}{Text void *}{Comma , }{CurrentParameter T}{RightParen )} (1) // CHECK-CC14: Completion contexts: // CHECK-CC14-NEXT: Any type // CHECK-CC14-NEXT: Any value @@ -266,8 +266,8 @@ // CHECK-CC14-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:60:10 %s | FileCheck -check-prefix=CHECK-CC15 %s -// CHECK-CC15: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter U}{Comma , }{Text void *}{Comma , }{Text void *}{RightParen )} (1) -// CHECK-CC15: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter T}{Comma , }{Text int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC15: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter U}{Comma , }{Text void *}{Comma , }{Text void *}{RightParen )} (1) +// CHECK-CC15: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter T}{Comma , }{Text int}{Comma , }{Text int}{RightParen )} (1) // CHECK-CC15: Completion contexts: // CHECK-CC15-NEXT: Any type // CHECK-CC15-NEXT: Any value @@ -279,8 +279,8 @@ // CHECK-CC15-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:60:13 %s | FileCheck -check-prefix=CHECK-CC16 %s -// CHECK-CC16: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) -// CHECK-CC16: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC16: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) +// CHECK-CC16: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) // CHECK-CC16: Completion contexts: // CHECK-CC16-NEXT: Any type // CHECK-CC16-NEXT: Any value @@ -292,7 +292,7 @@ // CHECK-CC16-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:60:17 %s | FileCheck -check-prefix=CHECK-CC17 %s -// CHECK-CC17: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC17: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC17: Completion contexts: // CHECK-CC17-NEXT: Any type // CHECK-CC17-NEXT: Any value @@ -304,7 +304,7 @@ // CHECK-CC17-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:61:10 %s | FileCheck -check-prefix=CHECK-CC18 %s -// CHECK-CC18: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter T}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC18: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter T}{Comma , }{Text U}{RightParen )} (1) // CHECK-CC18: Completion contexts: // CHECK-CC18-NEXT: Any type // CHECK-CC18-NEXT: Any value @@ -316,7 +316,7 @@ // CHECK-CC18-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:61:13 %s | FileCheck -check-prefix=CHECK-CC19 %s -// CHECK-CC19: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) +// CHECK-CC19: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) // CHECK-CC19: Completion contexts: // CHECK-CC19-NEXT: Any type // CHECK-CC19-NEXT: Any value @@ -328,7 +328,7 @@ // CHECK-CC19-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:62:15 %s | FileCheck -check-prefix=CHECK-CC20 %s -// CHECK-CC20: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC20: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{RightParen )} (1) // CHECK-CC20: Completion contexts: // CHECK-CC20-NEXT: Any type // CHECK-CC20-NEXT: Any value @@ -340,7 +340,7 @@ // CHECK-CC20-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:62:18 %s | FileCheck -check-prefix=CHECK-CC21 %s -// CHECK-CC21: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) +// CHECK-CC21: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) // CHECK-CC21: Completion contexts: // CHECK-CC21-NEXT: Any type // CHECK-CC21-NEXT: Any value @@ -352,7 +352,7 @@ // CHECK-CC21-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:63:26 %s | FileCheck -check-prefix=CHECK-CC22 %s -// CHECK-CC22: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC22: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) // CHECK-CC22: Completion contexts: // CHECK-CC22-NEXT: Any type // CHECK-CC22-NEXT: Any value @@ -364,7 +364,7 @@ // CHECK-CC22-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:64:10 %s | FileCheck -check-prefix=CHECK-CC23 %s -// CHECK-CC23: NotImplemented:{ResultType void}{Text foo_12}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC23: OverloadCandidate:{ResultType void}{Text foo_12}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) // CHECK-CC23: Completion contexts: // CHECK-CC23-NEXT: Any type // CHECK-CC23-NEXT: Any value @@ -376,7 +376,7 @@ // CHECK-CC23-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:64:12 %s | FileCheck -check-prefix=CHECK-CC24 %s -// CHECK-CC24: NotImplemented:{ResultType void}{Text foo_12}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC24: OverloadCandidate:{ResultType void}{Text foo_12}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) // CHECK-CC24: Completion contexts: // CHECK-CC24-NEXT: Any type // CHECK-CC24-NEXT: Any value @@ -388,7 +388,7 @@ // CHECK-CC24-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:67:11 %s | FileCheck -check-prefix=CHECK-CC25 %s -// CHECK-CC25: NotImplemented:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) +// CHECK-CC25: OverloadCandidate:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) // CHECK-CC25: Completion contexts: // CHECK-CC25-NEXT: Any type // CHECK-CC25-NEXT: Any value @@ -400,8 +400,8 @@ // CHECK-CC25-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:68:11 %s | FileCheck -check-prefix=CHECK-CC26 %s -// CHECK-CC26: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter int}{RightParen )} (1) -// CHECK-CC26: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC26: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC26: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{CurrentParameter void *}{RightParen )} (1) // CHECK-CC26: Completion contexts: // CHECK-CC26-NEXT: Any type // CHECK-CC26-NEXT: Any value @@ -413,8 +413,8 @@ // CHECK-CC26-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:69:11 %s | FileCheck -check-prefix=CHECK-CC27 %s -// CHECK-CC27: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) -// CHECK-CC27: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) +// CHECK-CC27: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC27: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) // CHECK-CC27: Completion contexts: // CHECK-CC27-NEXT: Any type // CHECK-CC27-NEXT: Any value @@ -426,7 +426,7 @@ // CHECK-CC27-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:69:14 %s | FileCheck -check-prefix=CHECK-CC28 %s -// CHECK-CC28: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC28: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC28: Completion contexts: // CHECK-CC28-NEXT: Any type // CHECK-CC28-NEXT: Any value @@ -438,7 +438,7 @@ // CHECK-CC28-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:70:13 %s | FileCheck -check-prefix=CHECK-CC29 %s -// CHECK-CC29: NotImplemented:{ResultType void}{Text foo_3}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC29: OverloadCandidate:{ResultType void}{Text foo_3}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) // CHECK-CC29: Completion contexts: // CHECK-CC29-NEXT: Any type // CHECK-CC29-NEXT: Any value @@ -450,7 +450,7 @@ // CHECK-CC29-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:71:14 %s | FileCheck -check-prefix=CHECK-CC30 %s -// CHECK-CC30: NotImplemented:{ResultType void}{Text foo_4}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC30: OverloadCandidate:{ResultType void}{Text foo_4}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC30: Completion contexts: // CHECK-CC30-NEXT: Any type // CHECK-CC30-NEXT: Any value @@ -462,7 +462,7 @@ // CHECK-CC30-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:72:13 %s | FileCheck -check-prefix=CHECK-CC31 %s -// CHECK-CC31: NotImplemented:{ResultType void}{Text foo_4}{LeftParen (}{Text void *}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC31: OverloadCandidate:{ResultType void}{Text foo_4}{LeftParen (}{Text void *}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC31: Completion contexts: // CHECK-CC31-NEXT: Any type // CHECK-CC31-NEXT: Any value @@ -474,8 +474,8 @@ // CHECK-CC31-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:73:14 %s | FileCheck -check-prefix=CHECK-CC32 %s -// CHECK-CC32: NotImplemented:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) -// CHECK-CC32: NotImplemented:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC32: OverloadCandidate:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC32: OverloadCandidate:{ResultType void}{Text foo_5}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) // CHECK-CC32: Completion contexts: // CHECK-CC32-NEXT: Any type // CHECK-CC32-NEXT: Any value @@ -487,7 +487,7 @@ // CHECK-CC32-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:74:16 %s | FileCheck -check-prefix=CHECK-CC33 %s -// CHECK-CC33: NotImplemented:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) +// CHECK-CC33: OverloadCandidate:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) // CHECK-CC33: Completion contexts: // CHECK-CC33-NEXT: Any type // CHECK-CC33-NEXT: Any value @@ -499,7 +499,7 @@ // CHECK-CC33-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:75:11 %s | FileCheck -check-prefix=CHECK-CC34 %s -// CHECK-CC34: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter T}{RightParen )} (1) +// CHECK-CC34: OverloadCandidate:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter T}{RightParen )} (1) // CHECK-CC34: Completion contexts: // CHECK-CC34-NEXT: Any type // CHECK-CC34-NEXT: Any value @@ -511,7 +511,7 @@ // CHECK-CC34-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:76:16 %s | FileCheck -check-prefix=CHECK-CC35 %s -// CHECK-CC35: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC35: OverloadCandidate:{ResultType void}{Text foo_7}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC35: Completion contexts: // CHECK-CC35-NEXT: Any type // CHECK-CC35-NEXT: Any value @@ -523,7 +523,7 @@ // CHECK-CC35-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:77:14 %s | FileCheck -check-prefix=CHECK-CC36 %s -// CHECK-CC36: NotImplemented:{ResultType void}{Text foo_8}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC36: OverloadCandidate:{ResultType void}{Text foo_8}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC36: Completion contexts: // CHECK-CC36-NEXT: Any type // CHECK-CC36-NEXT: Any value @@ -535,7 +535,7 @@ // CHECK-CC36-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:78:14 %s | FileCheck -check-prefix=CHECK-CC37 %s -// CHECK-CC37: NotImplemented:{ResultType void}{Text foo_9}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{RightParen )} (1) +// CHECK-CC37: OverloadCandidate:{ResultType void}{Text foo_9}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{RightParen )} (1) // CHECK-CC37: Completion contexts: // CHECK-CC37-NEXT: Any type // CHECK-CC37-NEXT: Any value @@ -547,7 +547,7 @@ // CHECK-CC37-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:79:13 %s | FileCheck -check-prefix=CHECK-CC38 %s -// CHECK-CC38: NotImplemented:{ResultType void}{Text foo_9}{LeftParen (}{Text void *}{Comma , }{CurrentParameter T}{RightParen )} (1) +// CHECK-CC38: OverloadCandidate:{ResultType void}{Text foo_9}{LeftParen (}{Text void *}{Comma , }{CurrentParameter T}{RightParen )} (1) // CHECK-CC38: Completion contexts: // CHECK-CC38-NEXT: Any type // CHECK-CC38-NEXT: Any value @@ -559,8 +559,8 @@ // CHECK-CC38-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:80:12 %s | FileCheck -check-prefix=CHECK-CC39 %s -// CHECK-CC39: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter T}{Comma , }{Text int}{Comma , }{Text int}{RightParen )} (1) -// CHECK-CC39: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter U}{Comma , }{Text void *}{Comma , }{Text void *}{RightParen )} (1) +// CHECK-CC39: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter T}{Comma , }{Text int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC39: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{CurrentParameter U}{Comma , }{Text void *}{Comma , }{Text void *}{RightParen )} (1) // CHECK-CC39: Completion contexts: // CHECK-CC39-NEXT: Any type // CHECK-CC39-NEXT: Any value @@ -572,8 +572,8 @@ // CHECK-CC39-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:80:15 %s | FileCheck -check-prefix=CHECK-CC40 %s -// CHECK-CC40: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) -// CHECK-CC40: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) +// CHECK-CC40: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC40: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{Comma , }{Text void *}{RightParen )} (1) // CHECK-CC40: Completion contexts: // CHECK-CC40-NEXT: Any type // CHECK-CC40-NEXT: Any value @@ -585,7 +585,7 @@ // CHECK-CC40-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:80:19 %s | FileCheck -check-prefix=CHECK-CC41 %s -// CHECK-CC41: NotImplemented:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC41: OverloadCandidate:{ResultType void}{Text foo_10}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC41: Completion contexts: // CHECK-CC41-NEXT: Any type // CHECK-CC41-NEXT: Any value @@ -597,7 +597,7 @@ // CHECK-CC41-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:81:12 %s | FileCheck -check-prefix=CHECK-CC42 %s -// CHECK-CC42: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter T}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC42: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter T}{Comma , }{Text U}{RightParen )} (1) // CHECK-CC42: Completion contexts: // CHECK-CC42-NEXT: Any type // CHECK-CC42-NEXT: Any value @@ -609,7 +609,7 @@ // CHECK-CC42-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:81:15 %s | FileCheck -check-prefix=CHECK-CC43 %s -// CHECK-CC43: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) +// CHECK-CC43: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) // CHECK-CC43: Completion contexts: // CHECK-CC43-NEXT: Any type // CHECK-CC43-NEXT: Any value @@ -621,7 +621,7 @@ // CHECK-CC43-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:82:17 %s | FileCheck -check-prefix=CHECK-CC44 %s -// CHECK-CC44: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC44: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{RightParen )} (1) // CHECK-CC44: Completion contexts: // CHECK-CC44-NEXT: Any type // CHECK-CC44-NEXT: Any value @@ -633,7 +633,7 @@ // CHECK-CC44-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:82:20 %s | FileCheck -check-prefix=CHECK-CC45 %s -// CHECK-CC45: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) +// CHECK-CC45: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{RightParen )} (1) // CHECK-CC45: Completion contexts: // CHECK-CC45-NEXT: Any type // CHECK-CC45-NEXT: Any value @@ -645,7 +645,7 @@ // CHECK-CC45-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:83:28 %s | FileCheck -check-prefix=CHECK-CC46 %s -// CHECK-CC46: NotImplemented:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC46: OverloadCandidate:{ResultType void}{Text foo_11}{LeftParen (}{Text int}{Comma , }{CurrentParameter void *}{RightParen )} (1) // CHECK-CC46: Completion contexts: // CHECK-CC46-NEXT: Any type // CHECK-CC46-NEXT: Any value @@ -657,7 +657,7 @@ // CHECK-CC46-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:84:12 %s | FileCheck -check-prefix=CHECK-CC47 %s -// CHECK-CC47: NotImplemented:{ResultType void}{Text foo_12}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) +// CHECK-CC47: OverloadCandidate:{ResultType void}{Text foo_12}{LeftParen (}{CurrentParameter int}{Comma , }{Text int}{RightParen )} (1) // CHECK-CC47: Completion contexts: // CHECK-CC47-NEXT: Any type // CHECK-CC47-NEXT: Any value @@ -669,7 +669,7 @@ // CHECK-CC47-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:84:14 %s | FileCheck -check-prefix=CHECK-CC48 %s -// CHECK-CC48: NotImplemented:{ResultType void}{Text foo_12}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) +// CHECK-CC48: OverloadCandidate:{ResultType void}{Text foo_12}{LeftParen (}{Text void *}{Comma , }{CurrentParameter void *}{RightParen )} (1) // CHECK-CC48: Completion contexts: // CHECK-CC48-NEXT: Any type // CHECK-CC48-NEXT: Any value @@ -681,7 +681,7 @@ // CHECK-CC48-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:85:12 %s | FileCheck -check-prefix=CHECK-CC49 %s -// CHECK-CC49: NotImplemented:{ResultType void}{Text foo_13}{LeftParen (}{CurrentParameter int}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC49: OverloadCandidate:{ResultType void}{Text foo_13}{LeftParen (}{CurrentParameter int}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) // CHECK-CC49: Completion contexts: // CHECK-CC49-NEXT: Any type // CHECK-CC49-NEXT: Any value @@ -693,7 +693,7 @@ // CHECK-CC49-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:85:15 %s | FileCheck -check-prefix=CHECK-CC50 %s -// CHECK-CC50: NotImplemented:{ResultType void}{Text foo_13}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC50: OverloadCandidate:{ResultType void}{Text foo_13}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) // CHECK-CC50: Completion contexts: // CHECK-CC50-NEXT: Any type // CHECK-CC50-NEXT: Any value @@ -705,7 +705,7 @@ // CHECK-CC50-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:85:19 %s | FileCheck -check-prefix=CHECK-CC51 %s -// CHECK-CC51: NotImplemented:{ResultType void}{Text foo_13}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC51: OverloadCandidate:{ResultType void}{Text foo_13}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC51: Completion contexts: // CHECK-CC51-NEXT: Any type // CHECK-CC51-NEXT: Any value @@ -717,7 +717,7 @@ // CHECK-CC51-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:87:12 %s | FileCheck -check-prefix=CHECK-CC52 %s -// CHECK-CC52: NotImplemented:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) +// CHECK-CC52: OverloadCandidate:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) // CHECK-CC52: Completion contexts: // CHECK-CC52-NEXT: Any type // CHECK-CC52-NEXT: Any value @@ -729,8 +729,8 @@ // CHECK-CC52-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:88:12 %s | FileCheck -check-prefix=CHECK-CC53 %s -// CHECK-CC53: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text void *}{RightParen )} (1) -// CHECK-CC53: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC53: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{Text void *}{RightParen )} (1) +// CHECK-CC53: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC53: Completion contexts: // CHECK-CC53-NEXT: Any type // CHECK-CC53-NEXT: Any value @@ -742,7 +742,7 @@ // CHECK-CC53-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:89:17 %s | FileCheck -check-prefix=CHECK-CC54 %s -// CHECK-CC54: NotImplemented:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) +// CHECK-CC54: OverloadCandidate:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) // CHECK-CC54: Completion contexts: // CHECK-CC54-NEXT: Any type // CHECK-CC54-NEXT: Any value @@ -754,7 +754,7 @@ // CHECK-CC54-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:90:12 %s | FileCheck -check-prefix=CHECK-CC55 %s -// CHECK-CC55: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC55: OverloadCandidate:{ResultType void}{Text foo_7}{LeftParen (}{Text T}{RightParen )} (1) // CHECK-CC55: Completion contexts: // CHECK-CC55-NEXT: Any type // CHECK-CC55-NEXT: Any value @@ -766,7 +766,7 @@ // CHECK-CC55-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:91:14 %s | FileCheck -check-prefix=CHECK-CC56 %s -// CHECK-CC56: NotImplemented:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) +// CHECK-CC56: OverloadCandidate:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) // CHECK-CC56: Completion contexts: // CHECK-CC56-NEXT: Any type // CHECK-CC56-NEXT: Any value @@ -778,8 +778,8 @@ // CHECK-CC56-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:92:14 %s | FileCheck -check-prefix=CHECK-CC57 %s -// CHECK-CC57: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text int}{RightParen )} (1) -// CHECK-CC57: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text void *}{RightParen )} (1) +// CHECK-CC57: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC57: OverloadCandidate:{ResultType void}{Text foo_2}{LeftParen (}{Text void *}{RightParen )} (1) // CHECK-CC57: Completion contexts: // CHECK-CC57-NEXT: Any type // CHECK-CC57-NEXT: Any value @@ -791,7 +791,7 @@ // CHECK-CC57-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:93:19 %s | FileCheck -check-prefix=CHECK-CC58 %s -// CHECK-CC58: NotImplemented:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) +// CHECK-CC58: OverloadCandidate:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) // CHECK-CC58: Completion contexts: // CHECK-CC58-NEXT: Any type // CHECK-CC58-NEXT: Any value @@ -803,7 +803,7 @@ // CHECK-CC58-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:94:14 %s | FileCheck -check-prefix=CHECK-CC59 %s -// CHECK-CC59: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC59: OverloadCandidate:{ResultType void}{Text foo_7}{LeftParen (}{Text T}{RightParen )} (1) // CHECK-CC59: Completion contexts: // CHECK-CC59-NEXT: Any type // CHECK-CC59-NEXT: Any value Index: test/Index/complete-constructor-params.cpp =================================================================== --- test/Index/complete-constructor-params.cpp +++ test/Index/complete-constructor-params.cpp @@ -18,33 +18,18 @@ // RUN: c-index-test -code-completion-at=%s:11:10 %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: Completion contexts: -// CHECK-CC1-NEXT: Unknown // CHECK-CC1-NEXT: Any type // CHECK-CC1-NEXT: Any value -// CHECK-CC1-NEXT: Objective-C object value -// CHECK-CC1-NEXT: Objective-C selector value -// CHECK-CC1-NEXT: C++ class type value -// CHECK-CC1-NEXT: Dot member access -// CHECK-CC1-NEXT: Arrow member access -// CHECK-CC1-NEXT: Objective-C property access // CHECK-CC1-NEXT: Enum tag // CHECK-CC1-NEXT: Union tag // CHECK-CC1-NEXT: Struct tag // CHECK-CC1-NEXT: Class name -// CHECK-CC1-NEXT: Namespace or namespace alias // CHECK-CC1-NEXT: Nested name specifier // CHECK-CC1-NEXT: Objective-C interface -// CHECK-CC1-NEXT: Objective-C protocol -// CHECK-CC1-NEXT: Objective-C category -// CHECK-CC1-NEXT: Objective-C instance method -// CHECK-CC1-NEXT: Objective-C class method -// CHECK-CC1-NEXT: Objective-C selector name -// CHECK-CC1-NEXT: Macro name -// CHECK-CC1-NEXT: Natural language // RUN: c-index-test -code-completion-at=%s:12:10 %s | FileCheck -check-prefix=CHECK-CC2 %s -// CHECK-CC2: NotImplemented:{Text S}{LeftParen (}{CurrentParameter const S &}{RightParen )} (1) -// CHECK-CC2: NotImplemented:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter const S &}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) // CHECK-CC2: Completion contexts: // CHECK-CC2-NEXT: Any type // CHECK-CC2-NEXT: Any value @@ -56,8 +41,8 @@ // CHECK-CC2-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:12:13 %s | FileCheck -check-prefix=CHECK-CC3 %s -// CHECK-CC3: NotImplemented:{Text S}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{Comma , }{Text U}{RightParen )} (1) -// CHECK-CC3: NotImplemented:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{Text S}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) // CHECK-CC3: Completion contexts: // CHECK-CC3-NEXT: Any type // CHECK-CC3-NEXT: Any value @@ -69,8 +54,8 @@ // CHECK-CC3-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:12:17 %s | FileCheck -check-prefix=CHECK-CC4 %s -// CHECK-CC4: NotImplemented:{Text S}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) -// CHECK-CC4: NotImplemented:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{Text S}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) // CHECK-CC4: Completion contexts: // CHECK-CC4-NEXT: Any type // CHECK-CC4-NEXT: Any value @@ -82,8 +67,8 @@ // CHECK-CC4-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:13:12 %s | FileCheck -check-prefix=CHECK-CC5 %s -// CHECK-CC5: NotImplemented:{Text S}{LeftParen (}{CurrentParameter const S &}{RightParen )} (1) -// CHECK-CC5: NotImplemented:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter const S &}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{Text S}{LeftParen (}{CurrentParameter int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) // CHECK-CC5: Completion contexts: // CHECK-CC5-NEXT: Any type // CHECK-CC5-NEXT: Any value @@ -95,8 +80,8 @@ // CHECK-CC5-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:13:15 %s | FileCheck -check-prefix=CHECK-CC6 %s -// CHECK-CC6: NotImplemented:{Text S}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{Comma , }{Text U}{RightParen )} (1) -// CHECK-CC6: NotImplemented:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{Text S}{LeftParen (}{Text int}{Comma , }{CurrentParameter U}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) // CHECK-CC6: Completion contexts: // CHECK-CC6-NEXT: Any type // CHECK-CC6-NEXT: Any value @@ -108,8 +93,8 @@ // CHECK-CC6-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:13:19 %s | FileCheck -check-prefix=CHECK-CC7 %s -// CHECK-CC7: NotImplemented:{Text S}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) -// CHECK-CC7: NotImplemented:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{Text S}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) // CHECK-CC7: Completion contexts: // CHECK-CC7-NEXT: Any type // CHECK-CC7-NEXT: Any value @@ -121,8 +106,8 @@ // CHECK-CC7-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:15:21 %s | FileCheck -check-prefix=CHECK-CC8 %s -// CHECK-CC8: NotImplemented:{Text S}{LeftParen (}{Text int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) -// CHECK-CC8: NotImplemented:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{Text S}{LeftParen (}{Text int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) // CHECK-CC8: Completion contexts: // CHECK-CC8-NEXT: Any type // CHECK-CC8-NEXT: Any value @@ -134,8 +119,8 @@ // CHECK-CC8-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:16:23 %s | FileCheck -check-prefix=CHECK-CC9 %s -// CHECK-CC9: NotImplemented:{Text S}{LeftParen (}{Text int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) -// CHECK-CC9: NotImplemented:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{Text S}{LeftParen (}{Text int}{Comma , }{Text U}{Comma , }{Text U}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{Text S}{LeftParen (}{Text const S &}{RightParen )} (1) // CHECK-CC9: Completion contexts: // CHECK-CC9-NEXT: Any type // CHECK-CC9-NEXT: Any value Index: test/Index/complete-exprs.c =================================================================== --- test/Index/complete-exprs.c +++ test/Index/complete-exprs.c @@ -49,6 +49,9 @@ // CHECK-CC2: NotImplemented:{TypedText float} (50) // CHECK-CC2: ParmDecl:{ResultType int}{TypedText j} (34) // CHECK-CC2: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40) +// RUN: c-index-test -code-completion-at=%s:11:16 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC4 %s +// CHECK-CC4: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50) +// CHECK-CC4: VarDecl:{ResultType struct X}{TypedText f1} (50) (deprecated) // RUN: c-index-test -code-completion-at=%s:19:3 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC6 %s // CHECK-CC6: FunctionDecl:{ResultType void}{TypedText f3}{LeftParen (}{Placeholder const char *, ...}{Text , NULL}{RightParen )} (50) Index: test/Index/complete-exprs.cpp =================================================================== --- test/Index/complete-exprs.cpp +++ test/Index/complete-exprs.cpp @@ -66,6 +66,14 @@ // CHECK-CC2-NOT: CXXConstructor // CHECK-CC2: ClassTemplate:{TypedText vector}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50) +// RUN: c-index-test -code-completion-at=%s:26:15 %s | FileCheck -check-prefix=CHECK-CC3 %s +// CHECK-CC3: NotImplemented:{TypedText float} (50) +// CHECK-CC3: FunctionDecl:{ResultType int}{TypedText foo}{LeftParen (}{RightParen )} (50) +// CHECK-CC3: FunctionDecl:{ResultType void}{TypedText g}{LeftParen (}{RightParen )} (50) +// CHECK-CC3: ClassTemplate:{TypedText vector}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50) +// CHECK-CC3: CXXConstructor:{TypedText vector}{LeftAngle <}{Placeholder typename T}{RightAngle >}{LeftParen (}{Placeholder const T &}{Comma , }{Placeholder unsigned int n}{RightParen )} (50) +// CHECK-CC3: FunctionTemplate:{ResultType void}{TypedText vector}{LeftAngle <}{Placeholder typename T}{RightAngle >}{LeftParen (}{Placeholder InputIterator first}{Comma , }{Placeholder InputIterator last}{RightParen )} (50) + // RUN: c-index-test -code-completion-at=%s:34:1 %s -std=c++0x | FileCheck -check-prefix=CHECK-CC4 %s // CHECK-CC4: NotImplemented:{ResultType const X *}{TypedText this} (40) Index: test/Index/complete-functor-call.cpp =================================================================== --- test/Index/complete-functor-call.cpp +++ test/Index/complete-functor-call.cpp @@ -22,9 +22,9 @@ } // RUN: c-index-test -code-completion-at=%s:14:5 %s | FileCheck -check-prefix=CHECK-CC1 %s -// CHECK-CC1: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) -// CHECK-CC1: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC1: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC1: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC1: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) +// CHECK-CC1: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) // CHECK-CC1: Completion contexts: // CHECK-CC1-NEXT: Any type // CHECK-CC1-NEXT: Any value @@ -36,9 +36,9 @@ // CHECK-CC1-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC2 %s -// CHECK-CC2: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) -// CHECK-CC2: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC2: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) // CHECK-CC2: Completion contexts: // CHECK-CC2-NEXT: Any type // CHECK-CC2-NEXT: Any value @@ -50,9 +50,9 @@ // CHECK-CC2-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:16:5 %s | FileCheck -check-prefix=CHECK-CC3 %s -// CHECK-CC3: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) -// CHECK-CC3: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC3: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) // CHECK-CC3: Completion contexts: // CHECK-CC3-NEXT: Any type // CHECK-CC3-NEXT: Any value @@ -64,10 +64,10 @@ // CHECK-CC3-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:16:7 %s | FileCheck -check-prefix=CHECK-CC4 %s -// CHECK-CC4: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) -// CHECK-CC4: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) -// CHECK-CC4: NotImplemented:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) -// CHECK-CC4: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC4: Completion contexts: // CHECK-CC4-NEXT: Any type // CHECK-CC4-NEXT: Any value @@ -79,10 +79,10 @@ // CHECK-CC4-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:16:10 %s | FileCheck -check-prefix=CHECK-CC5 %s -// CHECK-CC5: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{Text S}{Comma , }{CurrentParameter S}{RightParen )} (1) -// CHECK-CC5: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) -// CHECK-CC5: NotImplemented:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) -// CHECK-CC5: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{Text S}{Comma , }{CurrentParameter S}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC5: Completion contexts: // CHECK-CC5-NEXT: Any type // CHECK-CC5-NEXT: Any value @@ -94,10 +94,10 @@ // CHECK-CC5-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:17:17 %s | FileCheck -check-prefix=CHECK-CC6 %s -// CHECK-CC6: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) -// CHECK-CC6: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC6: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) -// CHECK-CC6: NotImplemented:{ResultType const S *}{Text operator()}{LeftParen (}{CurrentParameter const S &s}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{ResultType const S *}{Text operator()}{LeftParen (}{CurrentParameter const S &s}{RightParen )} (1) // CHECK-CC6: Completion contexts: // CHECK-CC6-NEXT: Any type // CHECK-CC6-NEXT: Any value @@ -109,10 +109,10 @@ // CHECK-CC6-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:17:28 %s | FileCheck -check-prefix=CHECK-CC7 %s -// CHECK-CC7: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) -// CHECK-CC7: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC7: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) -// CHECK-CC7: NotImplemented:{ResultType const S *}{Text operator()}{LeftParen (}{CurrentParameter const S &s}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{ResultType const S *}{Text operator()}{LeftParen (}{CurrentParameter const S &s}{RightParen )} (1) // CHECK-CC7: Completion contexts: // CHECK-CC7-NEXT: Any type // CHECK-CC7-NEXT: Any value @@ -124,10 +124,10 @@ // CHECK-CC7-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:17:31 %s | FileCheck -check-prefix=CHECK-CC8 %s -// CHECK-CC8: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) -// CHECK-CC8: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) -// CHECK-CC8: NotImplemented:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) -// CHECK-CC8: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC8: Completion contexts: // CHECK-CC8-NEXT: Any type // CHECK-CC8-NEXT: Any value @@ -139,10 +139,10 @@ // CHECK-CC8-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:17:35 %s | FileCheck -check-prefix=CHECK-CC9 %s -// CHECK-CC9: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) -// CHECK-CC9: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) -// CHECK-CC9: NotImplemented:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) -// CHECK-CC9: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{ResultType const S *}{Text operator()}{LeftParen (}{Text const S &s}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC9: Completion contexts: // CHECK-CC9-NEXT: Any type // CHECK-CC9-NEXT: Any value @@ -154,8 +154,8 @@ // CHECK-CC9-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:19:8 %s | FileCheck -check-prefix=CHECK-CC10 %s -// CHECK-CC10: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) -// CHECK-CC10: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC10: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC10: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC10: Completion contexts: // CHECK-CC10-NEXT: Any type // CHECK-CC10-NEXT: Any value @@ -167,8 +167,8 @@ // CHECK-CC10-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:20:7 %s | FileCheck -check-prefix=CHECK-CC11 %s -// CHECK-CC11: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) -// CHECK-CC11: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC11: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC11: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC11: Completion contexts: // CHECK-CC11-NEXT: Any type // CHECK-CC11-NEXT: Any value @@ -180,9 +180,9 @@ // CHECK-CC11-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:21:15 %s | FileCheck -check-prefix=CHECK-CC12 %s -// CHECK-CC12: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) -// CHECK-CC12: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) -// CHECK-CC12: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC12: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC12: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC12: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) // CHECK-CC12: Completion contexts: // CHECK-CC12-NEXT: Any type // CHECK-CC12-NEXT: Any value Index: test/Index/complete-macros.c =================================================================== --- test/Index/complete-macros.c +++ test/Index/complete-macros.c @@ -33,6 +33,9 @@ // RUN: c-index-test -code-completion-at=%s:14:8 %s -I%S | FileCheck -check-prefix=CHECK-CC2 %s // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:8 %s -I%S | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: macro definition:{TypedText nil} (32) +// RUN: c-index-test -code-completion-at=%s:15:5 %s -I%S | FileCheck -check-prefix=CHECK-CC3 %s +// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:15:5 %s -I%S | FileCheck -check-prefix=CHECK-CC3 %s +// CHECK-CC3: macro definition:{TypedText nil} (65) // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:25:2 %s -I%S | FileCheck -check-prefix=CHECK-VARIADIC %s // CHECK-VARIADIC: macro definition:{TypedText variadic1}{LeftParen (}{Placeholder ...}{RightParen )} (70) // CHECK-VARIADIC: macro definition:{TypedText variadic2}{LeftParen (}{Placeholder args...}{RightParen )} (70) Index: test/Index/complete-type-factors.m =================================================================== --- test/Index/complete-type-factors.m +++ test/Index/complete-type-factors.m @@ -77,6 +77,23 @@ // CHECK-CC3: EnumConstantDecl:{ResultType enum Color}{TypedText Red} (65) // CHECK-CC3: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40) // CHECK-CC3: FunctionDecl:{ResultType enum Priority}{TypedText test1}{LeftParen (}{Placeholder enum Priority priority}{Comma , }{Placeholder enum Color color}{Comma , }{Placeholder int integer}{RightParen )} (12) +// RUN: c-index-test -code-completion-at=%s:19:9 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC4 %s +// CHECK-CC4: EnumConstantDecl:{ResultType enum Color}{TypedText Blue} (65) +// CHECK-CC4: VarDecl:{ResultType enum Color}{TypedText c} (34) +// CHECK-CC4: ParmDecl:{ResultType enum Color}{TypedText color} (34) +// CHECK-CC4: FunctionDecl:{ResultType int}{TypedText func1}{LeftParen (}{Placeholder enum Color}{RightParen )} (50) +// CHECK-CC4: FunctionDecl:{ResultType enum Priority}{TypedText func2}{LeftParen (}{Placeholder int}{RightParen )} (50) +// CHECK-CC4: FunctionDecl:{ResultType void}{TypedText func3}{LeftParen (}{Placeholder float}{RightParen )} (50) +// CHECK-CC4: EnumConstantDecl:{ResultType enum Color}{TypedText Green} (65) +// CHECK-CC4: EnumConstantDecl:{ResultType enum Priority}{TypedText High} (65) +// CHECK-CC4: VarDecl:{ResultType int}{TypedText i} (34) +// CHECK-CC4: ParmDecl:{ResultType int}{TypedText integer} (34) +// CHECK-CC4: EnumConstantDecl:{ResultType enum Priority}{TypedText Low} (65) +// CHECK-CC4: ParmDecl:{ResultType enum Priority}{TypedText priority} (34) +// CHECK-CC4: EnumConstantDecl:{ResultType enum Color}{TypedText Red} (65) +// CHECK-CC4: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40) +// CHECK-CC4: FunctionDecl:{ResultType enum Priority}{TypedText test1}{LeftParen (}{Placeholder enum Priority priority}{Comma , }{Placeholder enum Color color}{Comma , }{Placeholder int integer}{RightParen )} (50) +// RUN: c-index-test -code-completion-at=%s:21:9 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC4 %s // RUN: c-index-test -code-completion-at=%s:22:7 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC6 %s // CHECK-CC6: VarDecl:{ResultType void (^)(enum Color, int)}{TypedText block} (34) // CHECK-CC6: EnumConstantDecl:{ResultType enum Color}{TypedText Blue} (16) Index: tools/libclang/CIndex.cpp =================================================================== --- tools/libclang/CIndex.cpp +++ tools/libclang/CIndex.cpp @@ -4208,6 +4208,8 @@ return cxstring::createRef("OMPTargetDirective"); case CXCursor_OMPTeamsDirective: return cxstring::createRef("OMPTeamsDirective"); + case CXCursor_OverloadCandidate: + return cxstring::createRef("OverloadCandidate"); } llvm_unreachable("Unhandled CXCursorKind"); Index: tools/libclang/CIndexCodeCompletion.cpp =================================================================== --- tools/libclang/CIndexCodeCompletion.cpp +++ tools/libclang/CIndexCodeCompletion.cpp @@ -622,7 +622,7 @@ getCodeCompletionTUInfo()); CXCompletionResult R; - R.CursorKind = CXCursor_NotImplemented; + R.CursorKind = CXCursor_OverloadCandidate; R.CompletionString = StoredCompletion; StoredResults.push_back(R); }