Index: lib/Sema/SemaCodeComplete.cpp =================================================================== --- lib/Sema/SemaCodeComplete.cpp +++ lib/Sema/SemaCodeComplete.cpp @@ -3823,11 +3823,9 @@ // When we're code-completing for a call, we DON'T fall back to ordinary // name code-completion whenever we can't produce specific // results. This will do "parameter completion" solely. - // I think "parameter completion" is not a good classification, since this - // is useful solely for providing hints and not code-completing. - // FIXME: Provide support for constructors and operator() - // (OverloadCandidateSet::CSK_Operator) + // FIXME: Provide support for constructors + // FIXME: Extend support of functors beyond bare indentifier based functors Expr *Fn = (Expr *)FnIn; @@ -3893,13 +3891,8 @@ /*PartialOverloading=*/true); } } - } else { - FunctionDecl *FDecl = nullptr; - if (auto DRE = dyn_cast(NakedFn)) - FDecl = dyn_cast(DRE->getDecl()); - else if (auto MCE = dyn_cast(NakedFn)) - FDecl = dyn_cast(MCE->getMemberDecl()); - if (FDecl) { + } else if (auto DRE = dyn_cast(NakedFn)) { + if (auto FDecl = dyn_cast(DRE->getDecl())) { if (!getLangOpts().CPlusPlus || !FDecl->getType()->getAs()) Results.push_back(ResultCandidate(FDecl)); @@ -3909,6 +3902,46 @@ Args, CandidateSet, /*SuppressUsedConversions=*/false, /*PartialOverloading=*/true); + } else if (auto Record = DRE->getType()->getAs()) { + QualType ObjectType = DRE->getType(); + Expr::Classification ObjectClassification = DRE->Classify(Context); + DeclarationName OpName = Context + .DeclarationNames + .getCXXOperatorName(OO_Call); + + LookupResult R(*this, OpName, DRE->getLocEnd(), LookupOrdinaryName); + LookupQualifiedName(R, Record->getDecl()); + R.suppressDiagnostics(); + for (auto I = R.begin(), E = R.end(); I != E; ++I) { + NamedDecl *Func = *I; + CXXRecordDecl *ActingDC = cast(Func->getDeclContext()); + if (isa(Func)) + Func = cast(Func)->getTargetDecl(); + + if (auto Method = dyn_cast(I.getDecl())) { + CXXRecordDecl *ActingDC = cast(I.getDecl()->getDeclContext()); + AddMethodCandidate(Method, I.getPair(), ActingDC, ObjectType, + ObjectClassification, Args, CandidateSet, + /*SuppressUserConversions=*/false, + /*PartialOverloading=*/true); + } else if (auto TemplateMethod = cast(Func)) { + AddMethodTemplateCandidate(TemplateMethod, + I.getPair(), ActingDC, + /*ExplicitArgs=*/nullptr, + ObjectType, ObjectClassification, + Args, CandidateSet, + /*SuppressUsedConversions=*/false, + /*PartialOverloading=*/true); + } + } + } + } else if (auto MCE = dyn_cast(NakedFn)) { + if (auto FDecl = dyn_cast(MCE->getMemberDecl())) { + // FIXME: access? + AddOverloadCandidate(FDecl, DeclAccessPair::make(FDecl, AS_none), + Args, CandidateSet, + /*SuppressUsedConversions=*/false, + /*PartialOverloading=*/true); } } Index: test/Index/complete-call.cpp =================================================================== --- test/Index/complete-call.cpp +++ test/Index/complete-call.cpp @@ -39,6 +39,7 @@ template void foo_10(U, void *, void *); template void foo_11(T, U); template void foo_12(T, T); + template void foo_13(V, T, T); }; int main() { @@ -81,6 +82,7 @@ s.foo_11(42, 42); s.foo_11(42, p); s.foo_12(p, p); + s.foo_13(42, 42, 42); foo_1(42,); foo_2(42,); @@ -92,7 +94,7 @@ s.foo_7(42,); } -// RUN: c-index-test -code-completion-at=%s:46:9 %s | FileCheck -check-prefix=CHECK-CC1 %s +// 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: Completion contexts: // CHECK-CC1-NEXT: Any type @@ -104,7 +106,7 @@ // CHECK-CC1-NEXT: Nested name specifier // CHECK-CC1-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:47:9 %s | FileCheck -check-prefix=CHECK-CC2 %s +// 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: Completion contexts: @@ -117,7 +119,7 @@ // CHECK-CC2-NEXT: Nested name specifier // CHECK-CC2-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:48:9 %s | FileCheck -check-prefix=CHECK-CC3 %s +// 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: Completion contexts: @@ -130,7 +132,7 @@ // CHECK-CC3-NEXT: Nested name specifier // CHECK-CC3-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:48:12 %s | FileCheck -check-prefix=CHECK-CC4 %s +// 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: Completion contexts: // CHECK-CC4-NEXT: Any type @@ -142,7 +144,7 @@ // CHECK-CC4-NEXT: Nested name specifier // CHECK-CC4-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:49:11 %s | FileCheck -check-prefix=CHECK-CC5 %s +// 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: Completion contexts: // CHECK-CC5-NEXT: Any type @@ -154,7 +156,7 @@ // CHECK-CC5-NEXT: Nested name specifier // CHECK-CC5-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:50:12 %s | FileCheck -check-prefix=CHECK-CC6 %s +// 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: Completion contexts: // CHECK-CC6-NEXT: Any type @@ -166,7 +168,7 @@ // CHECK-CC6-NEXT: Nested name specifier // CHECK-CC6-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:51:11 %s | FileCheck -check-prefix=CHECK-CC7 %s +// 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: Completion contexts: // CHECK-CC7-NEXT: Any type @@ -178,7 +180,7 @@ // CHECK-CC7-NEXT: Nested name specifier // CHECK-CC7-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:52:12 %s | FileCheck -check-prefix=CHECK-CC8 %s +// 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: Completion contexts: @@ -191,7 +193,7 @@ // CHECK-CC8-NEXT: Nested name specifier // CHECK-CC8-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:53:14 %s | FileCheck -check-prefix=CHECK-CC9 %s +// 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: Completion contexts: // CHECK-CC9-NEXT: Any type @@ -203,7 +205,7 @@ // CHECK-CC9-NEXT: Nested name specifier // CHECK-CC9-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:54:9 %s | FileCheck -check-prefix=CHECK-CC10 %s +// 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: Completion contexts: // CHECK-CC10-NEXT: Any type @@ -215,7 +217,7 @@ // CHECK-CC10-NEXT: Nested name specifier // CHECK-CC10-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:55:14 %s | FileCheck -check-prefix=CHECK-CC11 %s +// 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: Completion contexts: // CHECK-CC11-NEXT: Any type @@ -227,7 +229,7 @@ // CHECK-CC11-NEXT: Nested name specifier // CHECK-CC11-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:56:12 %s | FileCheck -check-prefix=CHECK-CC12 %s +// 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: Completion contexts: // CHECK-CC12-NEXT: Any type @@ -239,7 +241,7 @@ // CHECK-CC12-NEXT: Nested name specifier // CHECK-CC12-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:57:12 %s | FileCheck -check-prefix=CHECK-CC13 %s +// 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: Completion contexts: // CHECK-CC13-NEXT: Any type @@ -251,7 +253,7 @@ // CHECK-CC13-NEXT: Nested name specifier // CHECK-CC13-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:58:11 %s | FileCheck -check-prefix=CHECK-CC14 %s +// 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: Completion contexts: // CHECK-CC14-NEXT: Any type @@ -263,7 +265,7 @@ // CHECK-CC14-NEXT: Nested name specifier // CHECK-CC14-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:59:10 %s | FileCheck -check-prefix=CHECK-CC15 %s +// 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: Completion contexts: @@ -276,7 +278,7 @@ // CHECK-CC15-NEXT: Nested name specifier // CHECK-CC15-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:59:13 %s | FileCheck -check-prefix=CHECK-CC16 %s +// 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: Completion contexts: @@ -289,7 +291,7 @@ // CHECK-CC16-NEXT: Nested name specifier // CHECK-CC16-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:59:17 %s | FileCheck -check-prefix=CHECK-CC17 %s +// 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: Completion contexts: // CHECK-CC17-NEXT: Any type @@ -301,7 +303,7 @@ // CHECK-CC17-NEXT: Nested name specifier // CHECK-CC17-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:60:10 %s | FileCheck -check-prefix=CHECK-CC18 %s +// 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: Completion contexts: // CHECK-CC18-NEXT: Any type @@ -313,7 +315,7 @@ // CHECK-CC18-NEXT: Nested name specifier // CHECK-CC18-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:60:13 %s | FileCheck -check-prefix=CHECK-CC19 %s +// 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: Completion contexts: // CHECK-CC19-NEXT: Any type @@ -325,7 +327,7 @@ // CHECK-CC19-NEXT: Nested name specifier // CHECK-CC19-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:61:15 %s | FileCheck -check-prefix=CHECK-CC20 %s +// 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: Completion contexts: // CHECK-CC20-NEXT: Any type @@ -337,7 +339,7 @@ // CHECK-CC20-NEXT: Nested name specifier // CHECK-CC20-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:61:18 %s | FileCheck -check-prefix=CHECK-CC21 %s +// 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: Completion contexts: // CHECK-CC21-NEXT: Any type @@ -349,7 +351,7 @@ // CHECK-CC21-NEXT: Nested name specifier // CHECK-CC21-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:62:26 %s | FileCheck -check-prefix=CHECK-CC22 %s +// 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: Completion contexts: // CHECK-CC22-NEXT: Any type @@ -361,7 +363,7 @@ // CHECK-CC22-NEXT: Nested name specifier // CHECK-CC22-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:63:10 %s | FileCheck -check-prefix=CHECK-CC23 %s +// 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: Completion contexts: // CHECK-CC23-NEXT: Any type @@ -373,7 +375,7 @@ // CHECK-CC23-NEXT: Nested name specifier // CHECK-CC23-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:63:12 %s | FileCheck -check-prefix=CHECK-CC24 %s +// 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: Completion contexts: // CHECK-CC24-NEXT: Any type @@ -385,7 +387,7 @@ // CHECK-CC24-NEXT: Nested name specifier // CHECK-CC24-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:66:11 %s | FileCheck -check-prefix=CHECK-CC25 %s +// 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: Completion contexts: // CHECK-CC25-NEXT: Any type @@ -397,7 +399,7 @@ // CHECK-CC25-NEXT: Nested name specifier // CHECK-CC25-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:67:11 %s | FileCheck -check-prefix=CHECK-CC26 %s +// 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: Completion contexts: @@ -410,7 +412,7 @@ // CHECK-CC26-NEXT: Nested name specifier // CHECK-CC26-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:68:11 %s | FileCheck -check-prefix=CHECK-CC27 %s +// 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: Completion contexts: @@ -423,7 +425,7 @@ // CHECK-CC27-NEXT: Nested name specifier // CHECK-CC27-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:68:14 %s | FileCheck -check-prefix=CHECK-CC28 %s +// 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: Completion contexts: // CHECK-CC28-NEXT: Any type @@ -435,7 +437,7 @@ // CHECK-CC28-NEXT: Nested name specifier // CHECK-CC28-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:69:13 %s | FileCheck -check-prefix=CHECK-CC29 %s +// 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: Completion contexts: // CHECK-CC29-NEXT: Any type @@ -447,7 +449,7 @@ // CHECK-CC29-NEXT: Nested name specifier // CHECK-CC29-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:70:14 %s | FileCheck -check-prefix=CHECK-CC30 %s +// 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: Completion contexts: // CHECK-CC30-NEXT: Any type @@ -459,7 +461,7 @@ // CHECK-CC30-NEXT: Nested name specifier // CHECK-CC30-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:71:13 %s | FileCheck -check-prefix=CHECK-CC31 %s +// 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: Completion contexts: // CHECK-CC31-NEXT: Any type @@ -471,7 +473,7 @@ // CHECK-CC31-NEXT: Nested name specifier // CHECK-CC31-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:72:14 %s | FileCheck -check-prefix=CHECK-CC32 %s +// 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: Completion contexts: @@ -484,7 +486,7 @@ // CHECK-CC32-NEXT: Nested name specifier // CHECK-CC32-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:73:16 %s | FileCheck -check-prefix=CHECK-CC33 %s +// 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: Completion contexts: // CHECK-CC33-NEXT: Any type @@ -496,7 +498,7 @@ // CHECK-CC33-NEXT: Nested name specifier // CHECK-CC33-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:74:11 %s | FileCheck -check-prefix=CHECK-CC34 %s +// 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: Completion contexts: // CHECK-CC34-NEXT: Any type @@ -508,7 +510,7 @@ // CHECK-CC34-NEXT: Nested name specifier // CHECK-CC34-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:75:16 %s | FileCheck -check-prefix=CHECK-CC35 %s +// 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: Completion contexts: // CHECK-CC35-NEXT: Any type @@ -520,7 +522,7 @@ // CHECK-CC35-NEXT: Nested name specifier // CHECK-CC35-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:76:14 %s | FileCheck -check-prefix=CHECK-CC36 %s +// 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: Completion contexts: // CHECK-CC36-NEXT: Any type @@ -532,7 +534,7 @@ // CHECK-CC36-NEXT: Nested name specifier // CHECK-CC36-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:77:14 %s | FileCheck -check-prefix=CHECK-CC37 %s +// 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: Completion contexts: // CHECK-CC37-NEXT: Any type @@ -544,7 +546,7 @@ // CHECK-CC37-NEXT: Nested name specifier // CHECK-CC37-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:78:13 %s | FileCheck -check-prefix=CHECK-CC38 %s +// 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: Completion contexts: // CHECK-CC38-NEXT: Any type @@ -556,7 +558,7 @@ // CHECK-CC38-NEXT: Nested name specifier // CHECK-CC38-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:79:12 %s | FileCheck -check-prefix=CHECK-CC39 %s +// 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: Completion contexts: @@ -569,7 +571,7 @@ // CHECK-CC39-NEXT: Nested name specifier // CHECK-CC39-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:79:15 %s | FileCheck -check-prefix=CHECK-CC40 %s +// 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: Completion contexts: @@ -582,7 +584,7 @@ // CHECK-CC40-NEXT: Nested name specifier // CHECK-CC40-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:79:19 %s | FileCheck -check-prefix=CHECK-CC41 %s +// 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: Completion contexts: // CHECK-CC41-NEXT: Any type @@ -594,7 +596,7 @@ // CHECK-CC41-NEXT: Nested name specifier // CHECK-CC41-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:80:12 %s | FileCheck -check-prefix=CHECK-CC42 %s +// 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: Completion contexts: // CHECK-CC42-NEXT: Any type @@ -606,7 +608,7 @@ // CHECK-CC42-NEXT: Nested name specifier // CHECK-CC42-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:80:15 %s | FileCheck -check-prefix=CHECK-CC43 %s +// 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: Completion contexts: // CHECK-CC43-NEXT: Any type @@ -618,7 +620,7 @@ // CHECK-CC43-NEXT: Nested name specifier // CHECK-CC43-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:81:17 %s | FileCheck -check-prefix=CHECK-CC44 %s +// 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: Completion contexts: // CHECK-CC44-NEXT: Any type @@ -630,7 +632,7 @@ // CHECK-CC44-NEXT: Nested name specifier // CHECK-CC44-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:81:20 %s | FileCheck -check-prefix=CHECK-CC45 %s +// 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: Completion contexts: // CHECK-CC45-NEXT: Any type @@ -642,7 +644,7 @@ // CHECK-CC45-NEXT: Nested name specifier // CHECK-CC45-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:82:28 %s | FileCheck -check-prefix=CHECK-CC46 %s +// 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: Completion contexts: // CHECK-CC46-NEXT: Any type @@ -654,7 +656,7 @@ // CHECK-CC46-NEXT: Nested name specifier // CHECK-CC46-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:83:12 %s | FileCheck -check-prefix=CHECK-CC47 %s +// 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: Completion contexts: // CHECK-CC47-NEXT: Any type @@ -666,7 +668,7 @@ // CHECK-CC47-NEXT: Nested name specifier // CHECK-CC47-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:83:14 %s | FileCheck -check-prefix=CHECK-CC48 %s +// 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: Completion contexts: // CHECK-CC48-NEXT: Any type @@ -679,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_1}{LeftParen (}{RightParen )} (1) +// CHECK-CC49: NotImplemented:{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 @@ -690,9 +692,8 @@ // CHECK-CC49-NEXT: Nested name specifier // CHECK-CC49-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:86:12 %s | FileCheck -check-prefix=CHECK-CC50 %s -// CHECK-CC50: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text void *}{RightParen )} (1) -// CHECK-CC50: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text int}{RightParen )} (1) +// 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: Completion contexts: // CHECK-CC50-NEXT: Any type // CHECK-CC50-NEXT: Any value @@ -703,8 +704,8 @@ // CHECK-CC50-NEXT: Nested name specifier // CHECK-CC50-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:87:17 %s | FileCheck -check-prefix=CHECK-CC51 %s -// CHECK-CC51: NotImplemented:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) +// 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: Completion contexts: // CHECK-CC51-NEXT: Any type // CHECK-CC51-NEXT: Any value @@ -715,8 +716,8 @@ // CHECK-CC51-NEXT: Nested name specifier // CHECK-CC51-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:88:12 %s | FileCheck -check-prefix=CHECK-CC52 %s -// CHECK-CC52: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{Text T}{RightParen )} (1) +// 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: Completion contexts: // CHECK-CC52-NEXT: Any type // CHECK-CC52-NEXT: Any value @@ -727,8 +728,9 @@ // CHECK-CC52-NEXT: Nested name specifier // CHECK-CC52-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:89:14 %s | FileCheck -check-prefix=CHECK-CC53 %s -// CHECK-CC53: NotImplemented:{ResultType void}{Text foo_1}{LeftParen (}{RightParen )} (1) +// 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: Completion contexts: // CHECK-CC53-NEXT: Any type // CHECK-CC53-NEXT: Any value @@ -739,9 +741,8 @@ // CHECK-CC53-NEXT: Nested name specifier // CHECK-CC53-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:90:14 %s | FileCheck -check-prefix=CHECK-CC54 %s -// CHECK-CC54: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text int}{RightParen )} (1) -// CHECK-CC54: NotImplemented:{ResultType void}{Text foo_2}{LeftParen (}{Text void *}{RightParen )} (1) +// 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: Completion contexts: // CHECK-CC54-NEXT: Any type // CHECK-CC54-NEXT: Any value @@ -752,8 +753,8 @@ // CHECK-CC54-NEXT: Nested name specifier // CHECK-CC54-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:91:19 %s | FileCheck -check-prefix=CHECK-CC55 %s -// CHECK-CC55: NotImplemented:{ResultType void}{Text foo_6}{LeftParen (}{RightParen )} (1) +// 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: Completion contexts: // CHECK-CC55-NEXT: Any type // CHECK-CC55-NEXT: Any value @@ -764,8 +765,8 @@ // CHECK-CC55-NEXT: Nested name specifier // CHECK-CC55-NEXT: Objective-C interface -// RUN: c-index-test -code-completion-at=%s:92:14 %s | FileCheck -check-prefix=CHECK-CC56 %s -// CHECK-CC56: NotImplemented:{ResultType void}{Text foo_7}{LeftParen (}{Text T}{RightParen )} (1) +// 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: Completion contexts: // CHECK-CC56-NEXT: Any type // CHECK-CC56-NEXT: Any value @@ -775,3 +776,40 @@ // CHECK-CC56-NEXT: Class name // CHECK-CC56-NEXT: Nested name specifier // 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: Completion contexts: +// CHECK-CC57-NEXT: Any type +// CHECK-CC57-NEXT: Any value +// CHECK-CC57-NEXT: Enum tag +// CHECK-CC57-NEXT: Union tag +// CHECK-CC57-NEXT: Struct tag +// CHECK-CC57-NEXT: Class name +// CHECK-CC57-NEXT: Nested name specifier +// 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: Completion contexts: +// CHECK-CC58-NEXT: Any type +// CHECK-CC58-NEXT: Any value +// CHECK-CC58-NEXT: Enum tag +// CHECK-CC58-NEXT: Union tag +// CHECK-CC58-NEXT: Struct tag +// CHECK-CC58-NEXT: Class name +// CHECK-CC58-NEXT: Nested name specifier +// 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: Completion contexts: +// CHECK-CC59-NEXT: Any type +// CHECK-CC59-NEXT: Any value +// CHECK-CC59-NEXT: Enum tag +// CHECK-CC59-NEXT: Union tag +// CHECK-CC59-NEXT: Struct tag +// CHECK-CC59-NEXT: Class name +// CHECK-CC59-NEXT: Nested name specifier +// CHECK-CC59-NEXT: Objective-C interface Index: test/Index/complete-functor-call.cpp =================================================================== --- /dev/null +++ test/Index/complete-functor-call.cpp @@ -0,0 +1,130 @@ +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +template +struct S { + void operator()(int); + template void operator()(T); + template void operator()(V, T, T); +}; + +int main() { + S s; + s(42); + s(s); + s(0, s, s); + + s(42,); + s(s,); + s(0, 42, 42,); +} + +// RUN: c-index-test -code-completion-at=%s:13: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: Completion contexts: +// CHECK-CC1-NEXT: Any type +// CHECK-CC1-NEXT: Any value +// CHECK-CC1-NEXT: Enum tag +// CHECK-CC1-NEXT: Union tag +// CHECK-CC1-NEXT: Struct tag +// CHECK-CC1-NEXT: Class name +// CHECK-CC1-NEXT: Nested name specifier +// CHECK-CC1-NEXT: Objective-C interface + +// RUN: c-index-test -code-completion-at=%s:14: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: Completion contexts: +// CHECK-CC2-NEXT: Any type +// CHECK-CC2-NEXT: Any value +// CHECK-CC2-NEXT: Enum tag +// CHECK-CC2-NEXT: Union tag +// CHECK-CC2-NEXT: Struct tag +// CHECK-CC2-NEXT: Class name +// CHECK-CC2-NEXT: Nested name specifier +// CHECK-CC2-NEXT: Objective-C interface + +// RUN: c-index-test -code-completion-at=%s:15: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: Completion contexts: +// CHECK-CC3-NEXT: Any type +// CHECK-CC3-NEXT: Any value +// CHECK-CC3-NEXT: Enum tag +// CHECK-CC3-NEXT: Union tag +// CHECK-CC3-NEXT: Struct tag +// CHECK-CC3-NEXT: Class name +// CHECK-CC3-NEXT: Nested name specifier +// CHECK-CC3-NEXT: Objective-C interface + +// RUN: c-index-test -code-completion-at=%s:15:7 %s | FileCheck -check-prefix=CHECK-CC4 %s +// CHECK-CC4: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// 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 int}{RightParen )} (1) +// CHECK-CC4: Completion contexts: +// CHECK-CC4-NEXT: Any type +// CHECK-CC4-NEXT: Any value +// CHECK-CC4-NEXT: Enum tag +// CHECK-CC4-NEXT: Union tag +// CHECK-CC4-NEXT: Struct tag +// CHECK-CC4-NEXT: Class name +// CHECK-CC4-NEXT: Nested name specifier +// CHECK-CC4-NEXT: Objective-C interface + +// RUN: c-index-test -code-completion-at=%s:15:10 %s | FileCheck -check-prefix=CHECK-CC5 %s +// CHECK-CC5: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// 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 int}{RightParen )} (1) +// CHECK-CC5: Completion contexts: +// CHECK-CC5-NEXT: Any type +// CHECK-CC5-NEXT: Any value +// CHECK-CC5-NEXT: Enum tag +// CHECK-CC5-NEXT: Union tag +// CHECK-CC5-NEXT: Struct tag +// CHECK-CC5-NEXT: Class name +// CHECK-CC5-NEXT: Nested name specifier +// CHECK-CC5-NEXT: Objective-C interface + +// RUN: c-index-test -code-completion-at=%s:17:8 %s | FileCheck -check-prefix=CHECK-CC6 %s +// CHECK-CC6: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC6: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC6: Completion contexts: +// CHECK-CC6-NEXT: Any type +// CHECK-CC6-NEXT: Any value +// CHECK-CC6-NEXT: Enum tag +// CHECK-CC6-NEXT: Union tag +// CHECK-CC6-NEXT: Struct tag +// CHECK-CC6-NEXT: Class name +// CHECK-CC6-NEXT: Nested name specifier +// CHECK-CC6-NEXT: Objective-C interface + +// RUN: c-index-test -code-completion-at=%s:18:7 %s | FileCheck -check-prefix=CHECK-CC7 %s +// CHECK-CC7: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC7: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC7: Completion contexts: +// CHECK-CC7-NEXT: Any type +// CHECK-CC7-NEXT: Any value +// CHECK-CC7-NEXT: Enum tag +// CHECK-CC7-NEXT: Union tag +// CHECK-CC7-NEXT: Struct tag +// CHECK-CC7-NEXT: Class name +// CHECK-CC7-NEXT: Nested name specifier +// CHECK-CC7-NEXT: Objective-C interface + +// RUN: c-index-test -code-completion-at=%s:19:15 %s | FileCheck -check-prefix=CHECK-CC8 %s +// CHECK-CC8: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text T}{RightParen )} (1) +// CHECK-CC8: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC8: NotImplemented:{ResultType void}{Text operator()}{LeftParen (}{Text int}{RightParen )} (1) +// CHECK-CC8: Completion contexts: +// CHECK-CC8-NEXT: Any type +// CHECK-CC8-NEXT: Any value +// CHECK-CC8-NEXT: Enum tag +// CHECK-CC8-NEXT: Union tag +// CHECK-CC8-NEXT: Struct tag +// CHECK-CC8-NEXT: Class name +// CHECK-CC8-NEXT: Nested name specifier +// CHECK-CC8-NEXT: Objective-C interface