2010-09-21 05:11:48 +08:00
|
|
|
typedef signed char BOOL;
|
|
|
|
#define YES ((BOOL)1)
|
|
|
|
#define NO ((BOOL)0)
|
|
|
|
#define bool _Bool
|
2012-03-07 04:06:06 +08:00
|
|
|
@interface NSArray + (id)arrayWithObjects:(const id [])objects count:(unsigned long)cnt; @end
|
2010-09-18 23:16:27 +08:00
|
|
|
@interface A
|
|
|
|
- (int)method:(id)param1;
|
|
|
|
@property int prop1;
|
|
|
|
@end
|
2011-06-16 07:02:42 +08:00
|
|
|
__strong id global;
|
2010-09-18 23:16:27 +08:00
|
|
|
@implementation A
|
|
|
|
- (int)method:(id)param1 {
|
2011-09-28 06:38:19 +08:00
|
|
|
void foo(bool (^block)(id x, A* y));
|
2010-10-19 06:01:46 +08:00
|
|
|
for(BOOL B = YES; ; ) { }
|
2012-03-07 04:06:06 +08:00
|
|
|
@[ global ];
|
|
|
|
@{ global : global };
|
2010-09-18 23:16:27 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2010-09-21 05:11:48 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:13:2 %s | FileCheck -check-prefix=CHECK-CC1 %s
|
2012-06-16 02:19:56 +08:00
|
|
|
// CHECK-CC1: NotImplemented:{ResultType NSString *}{TypedText @"}{Placeholder string}{Text "} (40)
|
2012-07-18 07:24:47 +08:00
|
|
|
// CHECK-CC1: NotImplemented:{ResultType id}{TypedText @(}{Placeholder expression}{RightParen )} (40)
|
|
|
|
// CHECK-CC1: NotImplemented:{ResultType NSArray *}{TypedText @[}{Placeholder objects, ...}{RightBracket ]} (40)
|
2012-08-17 13:40:05 +08:00
|
|
|
// CHECK-CC1: NotImplemented:{ResultType NSDictionary *}{TypedText @{}{Placeholder key}{Colon :}{HorizontalSpace }{Placeholder object, ...}{RightBrace }} (40)
|
2010-09-18 23:16:27 +08:00
|
|
|
// CHECK-CC1: NotImplemented:{ResultType SEL}{TypedText _cmd} (80)
|
2010-09-21 07:11:55 +08:00
|
|
|
// CHECK-CC1: TypedefDecl:{TypedText BOOL} (50)
|
|
|
|
// CHECK-CC1: macro definition:{TypedText bool} (51)
|
2010-09-21 05:11:48 +08:00
|
|
|
// CHECK-CC1: macro definition:{TypedText NO} (65)
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC1: NotImplemented:{ResultType A *}{TypedText self} (34)
|
2010-09-21 05:11:48 +08:00
|
|
|
// CHECK-CC1: macro definition:{TypedText YES} (65)
|
2010-10-19 06:01:46 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:14:7 %s | FileCheck -check-prefix=CHECK-CC2 %s
|
|
|
|
// 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
|
|
|
|
// CHECK-CC2: TypedefDecl:{TypedText BOOL} (50)
|
|
|
|
// CHECK-CC2: NotImplemented:{TypedText char} (50)
|
2011-10-19 05:20:17 +08:00
|
|
|
// CHECK-CC2: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40)
|
2011-06-16 07:02:42 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:15:1 -fobjc-arc -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC3 %s
|
|
|
|
// 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
|
2011-09-28 06:38:19 +08:00
|
|
|
// CHECK-CC3: FunctionDecl:{ResultType void}{TypedText foo}{LeftParen (}{Placeholder ^bool(id x, A *y)block}{RightParen )} (34)
|
2011-06-16 07:02:42 +08:00
|
|
|
// CHECK-CC3: VarDecl:{ResultType id}{TypedText global} (50)
|
|
|
|
// CHECK-CC3: ParmDecl:{ResultType id}{TypedText param1} (34)
|
2012-03-07 04:06:06 +08:00
|
|
|
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC4 %s
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:16:5 %s | FileCheck -check-prefix=CHECK-CC4 %s
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:16:14 %s | FileCheck -check-prefix=CHECK-CC4 %s
|
2012-07-18 07:24:47 +08:00
|
|
|
// CHECK-CC4: NotImplemented:{ResultType NSArray *}{TypedText @[}{Placeholder objects, ...}{RightBracket ]} (40)
|
2012-08-17 13:40:05 +08:00
|
|
|
// CHECK-CC4: NotImplemented:{ResultType NSDictionary *}{TypedText @{}{Placeholder key}{Colon :}{HorizontalSpace }{Placeholder object, ...}{RightBrace }} (40)
|
2012-03-07 04:06:06 +08:00
|
|
|
// CHECK-CC4: NotImplemented:{ResultType SEL}{TypedText _cmd} (80)
|
|
|
|
// CHECK-CC4: macro definition:{TypedText bool} (51)
|
|
|
|
// CHECK-CC4: macro definition:{TypedText NO} (65)
|
|
|
|
// CHECK-CC4: NotImplemented:{ResultType A *}{TypedText self} (34)
|
|
|
|
// CHECK-CC4: macro definition:{TypedText YES} (65)
|