diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-07-31 15:27:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-07-31 15:27:48 +0000 |
commit | d48ab06b178e400ac31ef4fe649e9c33d2caf651 (patch) | |
tree | d47ada8dc8e14ad57799931ef3504a4ba7212bb5 /test | |
parent | 38b2186bcff61dd284552ba2e15c7a78a5b33b80 (diff) |
Tweak code-completion heuristics deciding between a lambda
code-completion and an Objective-C message send, based on Jordan's
feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Index/complete-lambdas.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Index/complete-lambdas.mm b/test/Index/complete-lambdas.mm index 5f33906471..3f77dd2069 100644 --- a/test/Index/complete-lambdas.mm +++ b/test/Index/complete-lambdas.mm @@ -16,6 +16,8 @@ [a instanceMethod:0 withOther:1]; [self someMethod:a]; [super instanceMethod]; + [&,a ]{}; + [a,self instanceMethod:0 withOther:1]{}; } @end @@ -38,3 +40,12 @@ // CHECK-CC4: NotImplemented:{ResultType A *}{TypedText super} (40) // RUN: c-index-test -code-completion-at=%s:18:10 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC1 %s + +// RUN: c-index-test -code-completion-at=%s:19:8 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC5 %s +// CHECK-CC5: NotImplemented:{ResultType SEL}{TypedText _cmd} (80) +// CHECK-CC5-NEXT: NotImplemented:{ResultType B *}{TypedText self} (34) + +// RUN: c-index-test -code-completion-at=%s:20:11 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC6 %s +// CHECK-CC6: ObjCInstanceMethodDecl:{ResultType id}{TypedText instanceMethod:}{Placeholder (int)}{HorizontalSpace }{TypedText withOther:}{Placeholder (int)} (37) (parent: ObjCInterfaceDecl 'A') +// CHECK-CC6-NEXT: ObjCInstanceMethodDecl:{ResultType id}{TypedText someMethod:}{Placeholder (A *)} (32) (parent: ObjCImplementationDecl 'B') + |