1f4a2713aSLionel Sambuc/* Run lines are at the end, since line/column matter in this test. */ 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc@interface A 4f4a2713aSLionel Sambuc- (void)method:(int)x; 5f4a2713aSLionel Sambuc@end 6f4a2713aSLionel Sambuc 7f4a2713aSLionel Sambuc@implementation A 8f4a2713aSLionel Sambuc- (void)method:(int)x { 9f4a2713aSLionel Sambuc A *a = [A method:1]; 10f4a2713aSLionel Sambuc blarg * blah = wibble; 11f4a2713aSLionel Sambuc A *a2; 12f4a2713aSLionel Sambuc z = [a2 method:1]; 13f4a2713aSLionel Sambuc blah ? blech : [a2 method:1]; 14f4a2713aSLionel Sambuc (a * a2)([a2 method:1]); 15f4a2713aSLionel Sambuc B *a = [a2 method:1]; 16f4a2713aSLionel Sambuc} 17f4a2713aSLionel Sambuc@end 18f4a2713aSLionel Sambuc 19f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:20 %s 2>%t | FileCheck -check-prefix=CHECK-CC1 %s 20f4a2713aSLionel Sambuc// RUN: not grep error %t 21f4a2713aSLionel Sambuc// CHECK-CC1: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} 22f4a2713aSLionel Sambuc// CHECK-CC1-NOT: NotImplemented:{TypedText _Bool} 23f4a2713aSLionel Sambuc// CHECK-CC1: VarDecl:{ResultType A *}{TypedText a} 24f4a2713aSLionel Sambuc// CHECK-CC1: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} 25f4a2713aSLionel Sambuc 26*0a6a1f1dSLionel Sambuc// Test case for fix committed in r145441. 27f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:20 %s -fms-compatibility | FileCheck -check-prefix=CHECK-CC1 %s 28f4a2713aSLionel Sambuc 29f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:10:24 %s | FileCheck -check-prefix=CHECK-CC2 %s 30f4a2713aSLionel Sambuc// CHECK-CC2: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} 31f4a2713aSLionel Sambuc// CHECK-CC2: NotImplemented:{TypedText _Bool} 32f4a2713aSLionel Sambuc// CHECK-CC2: VarDecl:{ResultType A *}{TypedText a} 33f4a2713aSLionel Sambuc// CHECK-CC2: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} 34f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:12:11 %s | FileCheck -check-prefix=CHECK-CC3 %s 35f4a2713aSLionel Sambuc// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType void}{TypedText method:}{Placeholder (int)} (32) 36f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:13:22 %s | FileCheck -check-prefix=CHECK-CC3 %s 37f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:14:16 %s | FileCheck -check-prefix=CHECK-CC3 %s 38f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:15:14 %s | FileCheck -check-prefix=CHECK-CC3 %s 39