Douglas Gregor | dc84534 | 2010-05-25 05:58:43 +0000 | [diff] [blame] | 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]; |
Douglas Gregor | 200b292 | 2010-09-17 22:25:06 +0000 | [diff] [blame] | 10 | blarg * blah = wibble; |
| 11 | A *a2; |
| 12 | z = [a2 method:1]; |
Douglas Gregor | 9485989 | 2010-09-17 22:41:34 +0000 | [diff] [blame] | 13 | blah ? blech : [a2 method:1]; |
Douglas Gregor | ac5fd84 | 2010-09-18 01:28:11 +0000 | [diff] [blame] | 14 | (a * a2)([a2 method:1]); |
Douglas Gregor | 833ba9c | 2010-09-18 02:10:40 +0000 | [diff] [blame] | 15 | B *a = [a2 method:1]; |
Douglas Gregor | dc84534 | 2010-05-25 05:58:43 +0000 | [diff] [blame] | 16 | } |
| 17 | @end |
| 18 | |
Douglas Gregor | 32be4a5 | 2010-10-11 21:37:58 +0000 | [diff] [blame] | 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 |
Douglas Gregor | dc84534 | 2010-05-25 05:58:43 +0000 | [diff] [blame] | 20 | // RUN: not grep error %t |
Douglas Gregor | 8ca7208 | 2011-10-18 21:20:17 +0000 | [diff] [blame] | 21 | // CHECK-CC1: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} |
Douglas Gregor | 4710e5b | 2010-05-28 00:49:12 +0000 | [diff] [blame] | 22 | // CHECK-CC1-NOT: NotImplemented:{TypedText _Bool} |
Douglas Gregor | dc84534 | 2010-05-25 05:58:43 +0000 | [diff] [blame] | 23 | // CHECK-CC1: VarDecl:{ResultType A *}{TypedText a} |
Douglas Gregor | 8ca7208 | 2011-10-18 21:20:17 +0000 | [diff] [blame] | 24 | // CHECK-CC1: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} |
Douglas Gregor | dc84534 | 2010-05-25 05:58:43 +0000 | [diff] [blame] | 25 | |
Lang Hames | 436bd50 | 2011-11-30 23:03:25 +0000 | [diff] [blame] | 26 | // Test case for fix comitted 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 | |
Douglas Gregor | 32be4a5 | 2010-10-11 21:37:58 +0000 | [diff] [blame] | 29 | // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:10:24 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | 8ca7208 | 2011-10-18 21:20:17 +0000 | [diff] [blame] | 30 | // CHECK-CC2: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} |
Douglas Gregor | 4710e5b | 2010-05-28 00:49:12 +0000 | [diff] [blame] | 31 | // CHECK-CC2: NotImplemented:{TypedText _Bool} |
| 32 | // CHECK-CC2: VarDecl:{ResultType A *}{TypedText a} |
Douglas Gregor | 8ca7208 | 2011-10-18 21:20:17 +0000 | [diff] [blame] | 33 | // CHECK-CC2: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} |
Douglas Gregor | 32be4a5 | 2010-10-11 21:37:58 +0000 | [diff] [blame] | 34 | // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:12:11 %s | FileCheck -check-prefix=CHECK-CC3 %s |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 35 | // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType void}{TypedText method:}{Placeholder (int)} (32) |
Douglas Gregor | 32be4a5 | 2010-10-11 21:37:58 +0000 | [diff] [blame] | 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 |