complete-recovery.m revision ac5fd8404fa8ecfae28be76f98fd0d926350354c
1/* Run lines are at the end, since line/column matter in this test. */ 2 3@interface A 4- (void)method:(int)x; 5@end 6 7@implementation A 8- (void)method:(int)x { 9 A *a = [A method:1]; 10 blarg * blah = wibble; 11 A *a2; 12 z = [a2 method:1]; 13 blah ? blech : [a2 method:1]; 14 (a * a2)([a2 method:1]); 15} 16@end 17 18// RUN: c-index-test -code-completion-at=%s:9:20 -Xclang -code-completion-patterns %s 2>%t | FileCheck -check-prefix=CHECK-CC1 %s 19// RUN: not grep error %t 20// CHECK-CC1: NotImplemented:{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} 21// CHECK-CC1-NOT: NotImplemented:{TypedText _Bool} 22// CHECK-CC1: VarDecl:{ResultType A *}{TypedText a} 23// CHECK-CC1: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} 24 25// RUN: c-index-test -code-completion-at=%s:10:24 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s 26// CHECK-CC2: NotImplemented:{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} 27// CHECK-CC2: NotImplemented:{TypedText _Bool} 28// CHECK-CC2: VarDecl:{ResultType A *}{TypedText a} 29// CHECK-CC2: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} 30// RUN: c-index-test -code-completion-at=%s:12:11 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s 31// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType void}{TypedText method:}{Placeholder (int)} (17) 32// RUN: c-index-test -code-completion-at=%s:13:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s 33// RUN: c-index-test -code-completion-at=%s:14:16 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s 34