Home | History | Annotate | Download | only in Index
      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   B *a = [a2 method:1];
     16 }
     17 @end
     18 
     19 // 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
     20 // RUN: not grep error %t
     21 // CHECK-CC1: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
     22 // CHECK-CC1-NOT: NotImplemented:{TypedText _Bool}
     23 // CHECK-CC1: VarDecl:{ResultType A *}{TypedText a}
     24 // CHECK-CC1: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )}
     25 
     26 // Test case for fix committed in r145441.
     27 // 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
     28 
     29 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:10:24 %s | FileCheck -check-prefix=CHECK-CC2 %s
     30 // CHECK-CC2: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
     31 // CHECK-CC2: NotImplemented:{TypedText _Bool}
     32 // CHECK-CC2: VarDecl:{ResultType A *}{TypedText a}
     33 // CHECK-CC2: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )}
     34 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:12:11 %s | FileCheck -check-prefix=CHECK-CC3 %s
     35 // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType void}{TypedText method:}{Placeholder (int)} (32)
     36 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:13:22 %s | FileCheck -check-prefix=CHECK-CC3 %s
     37 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:14:16 %s | FileCheck -check-prefix=CHECK-CC3 %s
     38 // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:15:14 %s | FileCheck -check-prefix=CHECK-CC3 %s
     39