1dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor/* Run lines are at the end, since line/column matter in this test. */ 2dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor 3dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor@interface A 4dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor- (void)method:(int)x; 5dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor@end 6dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor 7dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor@implementation A 8dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor- (void)method:(int)x { 9dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor A *a = [A method:1]; 10200b2921390bd75a659be3c77011e9a5548b7273Douglas Gregor blarg * blah = wibble; 11200b2921390bd75a659be3c77011e9a5548b7273Douglas Gregor A *a2; 12200b2921390bd75a659be3c77011e9a5548b7273Douglas Gregor z = [a2 method:1]; 1394859890384652ed63f7604530f3b988ed223cf4Douglas Gregor blah ? blech : [a2 method:1]; 14ac5fd8404fa8ecfae28be76f98fd0d926350354cDouglas Gregor (a * a2)([a2 method:1]); 15833ba9c6913d825016b432b0c4e4f784b1a9eb87Douglas Gregor B *a = [a2 method:1]; 16dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor} 17dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor@end 18dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor 1932be4a588fbb87d0d163ead49c42f5438bf0b2b7Douglas Gregor// 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 20dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor// RUN: not grep error %t 218ca7208d0fb4dcbc5fa8cfeca6a1081ce69da8e0Douglas Gregor// CHECK-CC1: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} 224710e5b12b58dda87d82c5875f13ab9c8979cd8cDouglas Gregor// CHECK-CC1-NOT: NotImplemented:{TypedText _Bool} 23dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor// CHECK-CC1: VarDecl:{ResultType A *}{TypedText a} 248ca7208d0fb4dcbc5fa8cfeca6a1081ce69da8e0Douglas Gregor// CHECK-CC1: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} 25dc8453422bec3bbf70c03920e01498d75783d122Douglas Gregor 26436bd50a3821c0f7a859af0e423d5c0a55159bf1Lang Hames// Test case for fix comitted in r145441. 27436bd50a3821c0f7a859af0e423d5c0a55159bf1Lang Hames// 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 28436bd50a3821c0f7a859af0e423d5c0a55159bf1Lang Hames 2932be4a588fbb87d0d163ead49c42f5438bf0b2b7Douglas Gregor// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:10:24 %s | FileCheck -check-prefix=CHECK-CC2 %s 308ca7208d0fb4dcbc5fa8cfeca6a1081ce69da8e0Douglas Gregor// CHECK-CC2: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} 314710e5b12b58dda87d82c5875f13ab9c8979cd8cDouglas Gregor// CHECK-CC2: NotImplemented:{TypedText _Bool} 324710e5b12b58dda87d82c5875f13ab9c8979cd8cDouglas Gregor// CHECK-CC2: VarDecl:{ResultType A *}{TypedText a} 338ca7208d0fb4dcbc5fa8cfeca6a1081ce69da8e0Douglas Gregor// CHECK-CC2: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} 3432be4a588fbb87d0d163ead49c42f5438bf0b2b7Douglas Gregor// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:12:11 %s | FileCheck -check-prefix=CHECK-CC3 %s 358ec904c151abf7ed0dc911258574a904ed97ff15Douglas Gregor// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType void}{TypedText method:}{Placeholder (int)} (32) 3632be4a588fbb87d0d163ead49c42f5438bf0b2b7Douglas Gregor// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:13:22 %s | FileCheck -check-prefix=CHECK-CC3 %s 3732be4a588fbb87d0d163ead49c42f5438bf0b2b7Douglas Gregor// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:14:16 %s | FileCheck -check-prefix=CHECK-CC3 %s 3832be4a588fbb87d0d163ead49c42f5438bf0b2b7Douglas Gregor// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:15:14 %s | FileCheck -check-prefix=CHECK-CC3 %s 39