2009-12-15 18:49:47 +00:00
|
|
|
/* The run lines are below, because this test is line- and
|
|
|
|
column-number sensitive. */
|
2010-01-15 15:39:40 +00:00
|
|
|
@interface MyClass { int ivar; }
|
2009-12-15 18:49:47 +00:00
|
|
|
- (int)myMethod:(int)arg;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MyClass
|
|
|
|
- (int)myMethod:(int)arg {
|
|
|
|
@synchronized (@encode(MyClass)) { }
|
|
|
|
}
|
|
|
|
@end
|
2010-09-17 15:54:40 +00:00
|
|
|
|
|
|
|
@interface A
|
|
|
|
+ (int)add:(int)x to:(int)y;
|
|
|
|
+ (int)add:(int)x to:(int)y plus:(int)z;
|
|
|
|
@end
|
|
|
|
|
|
|
|
void f() {
|
|
|
|
@selector(add:to:);
|
|
|
|
}
|
|
|
|
|
2011-02-20 13:06:31 +00:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:4 %s | FileCheck -check-prefix=CHECK-CC1 %s
|
2009-12-15 18:49:47 +00:00
|
|
|
// CHECK-CC1: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )}
|
|
|
|
// CHECK-CC1: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
|
|
|
|
// CHECK-CC1: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )}
|
2010-01-15 15:39:40 +00:00
|
|
|
// CHECK-CC1: {TypedText synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
|
2010-05-04 16:12:48 +00:00
|
|
|
// CHECK-CC1: {TypedText throw}{HorizontalSpace }{Placeholder expression}
|
2009-12-15 18:49:47 +00:00
|
|
|
// CHECK-CC1: {TypedText try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }}
|
2011-02-20 13:06:31 +00:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:19 %s | FileCheck -check-prefix=CHECK-CC2 %s
|
2009-12-15 18:49:47 +00:00
|
|
|
// CHECK-CC2: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )}
|
|
|
|
// CHECK-CC2: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
|
|
|
|
// CHECK-CC2: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )}
|
2011-02-20 13:06:31 +00:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:3 %s | FileCheck -check-prefix=CHECK-CC3 %s
|
2012-04-14 14:01:31 +00:00
|
|
|
// CHECK-CC3: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
|
|
|
|
// CHECK-CC3: NotImplemented:{ResultType Protocol *}{TypedText @protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
|
|
|
|
// CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText @selector}{LeftParen (}{Placeholder selector}{RightParen )}
|
2010-01-15 15:39:40 +00:00
|
|
|
// CHECK-CC3: NotImplemented:{TypedText @synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
|
2010-05-04 16:12:48 +00:00
|
|
|
// CHECK-CC3: NotImplemented:{TypedText @throw}{HorizontalSpace }{Placeholder expression}
|
2010-01-15 15:39:40 +00:00
|
|
|
// CHECK-CC3: NotImplemented:{TypedText @try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }}
|
|
|
|
// CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText _cmd}
|
|
|
|
// CHECK-CC3: ParmDecl:{ResultType int}{TypedText arg}
|
|
|
|
// CHECK-CC3: TypedefDecl:{TypedText Class}
|
|
|
|
// CHECK-CC3: TypedefDecl:{TypedText id}
|
|
|
|
// CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText ivar}
|
|
|
|
// CHECK-CC3: ObjCInterfaceDecl:{TypedText MyClass}
|
|
|
|
// CHECK-CC3: TypedefDecl:{TypedText SEL}
|
|
|
|
// CHECK-CC3: NotImplemented:{ResultType MyClass *}{TypedText self}
|
2010-09-17 15:54:40 +00:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:19:13 %s | FileCheck -check-prefix=CHECK-CC4 %s
|
2011-02-20 13:06:31 +00:00
|
|
|
// CHECK-CC4: NotImplemented:{TypedText add:to:} (40)
|
|
|
|
// CHECK-CC4: NotImplemented:{TypedText add:to:plus:} (40)
|
|
|
|
// CHECK-CC4: NotImplemented:{TypedText myMethod:} (40)
|
2010-09-17 15:54:40 +00:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:19:17 %s | FileCheck -check-prefix=CHECK-CC5 %s
|
2011-02-20 13:06:31 +00:00
|
|
|
// CHECK-CC5: NotImplemented:{Informative add:}{TypedText to:} (40)
|
|
|
|
// CHECK-CC5: NotImplemented:{Informative add:}{TypedText to:plus:} (40)
|
2010-09-17 15:54:40 +00:00
|
|
|
|