1 typedef signed char BOOL; 2 #define YES ((BOOL)1) 3 #define NO ((BOOL)0) 4 #define bool _Bool 5 @interface A 6 - (int)method:(id)param1; 7 8 @property int prop1; 9 @end 10 __strong id global; 11 @implementation A 12 - (int)method:(id)param1 { 13 void foo(id (^block)(id x, A* y)); 14 for(BOOL B = YES; ; ) { } 15 } 16 @end 17 18 // RUN: c-index-test -code-completion-at=%s:13:2 %s | FileCheck -check-prefix=CHECK-CC1 %s 19 // CHECK-CC1: NotImplemented:{ResultType SEL}{TypedText _cmd} (80) 20 // CHECK-CC1: TypedefDecl:{TypedText BOOL} (50) 21 // CHECK-CC1: macro definition:{TypedText bool} (51) 22 // CHECK-CC1: macro definition:{TypedText NO} (65) 23 // CHECK-CC1: NotImplemented:{ResultType A *}{TypedText self} (34) 24 // CHECK-CC1: macro definition:{TypedText YES} (65) 25 // RUN: c-index-test -code-completion-at=%s:14:7 %s | FileCheck -check-prefix=CHECK-CC2 %s 26 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:7 %s | FileCheck -check-prefix=CHECK-CC2 %s 27 // CHECK-CC2: TypedefDecl:{TypedText BOOL} (50) 28 // CHECK-CC2: NotImplemented:{TypedText char} (50) 29 // CHECK-CC2: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40) 30 // RUN: c-index-test -code-completion-at=%s:15:1 -fobjc-arc -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC3 %s 31 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:15:1 -fobjc-arc -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC3 %s 32 // CHECK-CC3: FunctionDecl:{ResultType void}{TypedText foo}{LeftParen (}{Placeholder ^id(id x, A *y)block}{RightParen )} (34) 33 // CHECK-CC3: VarDecl:{ResultType id}{TypedText global} (50) 34 // CHECK-CC3: ParmDecl:{ResultType id}{TypedText param1} (34) 35