2010-04-07 08:21:17 +08:00
|
|
|
/* Note: the RUN lines are near the end of the file, since line/column
|
|
|
|
matter for this test. */
|
2011-02-16 06:19:42 +08:00
|
|
|
#define IBAction void
|
2010-04-07 08:21:17 +08:00
|
|
|
@protocol P1
|
|
|
|
- (id)abc;
|
|
|
|
- (id)initWithInt:(int)x;
|
2012-04-11 02:35:07 +08:00
|
|
|
- (id)initWithTwoInts:(inout int)x second:(int)y;
|
2010-04-07 08:21:17 +08:00
|
|
|
- (int)getInt;
|
|
|
|
- (id)getSelf;
|
|
|
|
@end
|
2012-06-12 21:44:08 +08:00
|
|
|
@protocol P1;
|
2010-04-07 08:21:17 +08:00
|
|
|
@protocol P2<P1>
|
|
|
|
+ (id)alloc;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface A <P1>
|
|
|
|
- (id)init;
|
|
|
|
- (int)getValue;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface B : A<P2>
|
|
|
|
- (id)initWithInt:(int)x;
|
|
|
|
- (int)getSecondValue;
|
|
|
|
- (id)getSelf;
|
|
|
|
- (int)setValue:(int)x;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface B (FooBar)
|
|
|
|
- (id)categoryFunction:(int)x;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation B
|
|
|
|
- (int)getSecondValue { return 0; }
|
|
|
|
- (id)init { return self; }
|
|
|
|
- (id)getSelf { return self; }
|
|
|
|
- (void)setValue:(int)x { }
|
|
|
|
- (id)initWithTwoInts:(int)x second:(int)y { return self; }
|
|
|
|
+ (id)alloc { return 0; }
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation B (FooBar)
|
|
|
|
- (id)categoryFunction:(int)x { return self; }
|
|
|
|
@end
|
|
|
|
|
2010-07-09 07:20:03 +08:00
|
|
|
@interface C
|
|
|
|
- (int)first:(int)x second:(float)y third:(double)z;
|
2010-07-09 07:37:41 +08:00
|
|
|
- (id)first:(int)xx second2:(float)y2 third:(double)z;
|
|
|
|
- (void*)first:(int)xxx second3:(float)y3 third:(double)z;
|
2010-07-09 07:20:03 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface D
|
2010-07-09 07:37:41 +08:00
|
|
|
- (int)first:(int)x second2:(float)y third:(double)z;
|
2010-07-09 07:20:03 +08:00
|
|
|
@end
|
|
|
|
|
2010-08-17 23:53:35 +08:00
|
|
|
@implementation D
|
2010-08-24 09:06:58 +08:00
|
|
|
- (int)first:(int)x second2:(float)y third:(double)z { }
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Passing
|
2012-04-11 02:35:07 +08:00
|
|
|
- (oneway void)method:(in id)x;
|
2010-08-17 23:53:35 +08:00
|
|
|
@end
|
|
|
|
|
2011-02-19 06:29:55 +08:00
|
|
|
@interface Gaps
|
|
|
|
- (void)method:(int)x :(int)y;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Gaps
|
2012-04-11 02:35:07 +08:00
|
|
|
- (void)method:(int)x :(int)y {}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Passing
|
|
|
|
- (oneway void)method:(in id x) {}
|
2011-02-19 06:29:55 +08:00
|
|
|
@end
|
|
|
|
|
2014-03-06 03:10:31 +08:00
|
|
|
typedef A MyObject;
|
|
|
|
typedef A *MyObjectRef;
|
|
|
|
|
2014-03-05 14:47:57 +08:00
|
|
|
@interface I1
|
|
|
|
-(Class<P1>)meth;
|
2014-03-06 03:10:31 +08:00
|
|
|
-(MyObject <P1> *)meth2;
|
|
|
|
-(MyObjectRef)meth3;
|
2014-03-05 14:47:57 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I1
|
2015-06-20 02:27:52 +08:00
|
|
|
-(void)foo {}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I2
|
|
|
|
-(nonnull I2 *)produceI2:(nullable I2 *)i2;
|
2015-07-25 01:00:19 +08:00
|
|
|
-(int *__nullable *__nullable)something:(void(^__nullable)(int *__nullable))b;
|
2015-07-29 01:38:51 +08:00
|
|
|
@property (nullable, strong) id prop;
|
|
|
|
@property (nullable, strong) void(^propWB)(int *_Nullable);
|
2015-06-20 02:27:52 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I2
|
2015-07-07 14:20:31 +08:00
|
|
|
-(void)foo {}
|
|
|
|
@end
|
|
|
|
|
|
|
|
#pragma clang assume_nonnull begin
|
|
|
|
@interface I3
|
|
|
|
-(I3 *)produceI3:(I3 *)i3;
|
|
|
|
-(instancetype)getI3;
|
|
|
|
@end
|
|
|
|
#pragma clang assume_nonnull end
|
|
|
|
|
|
|
|
@implementation I3
|
|
|
|
-(void)foo {}
|
2014-03-05 14:47:57 +08:00
|
|
|
@end
|
|
|
|
|
2010-04-07 08:21:17 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:17:3 %s | FileCheck -check-prefix=CHECK-CC1 %s
|
2012-09-27 00:39:56 +08:00
|
|
|
// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText abc} (40)
|
|
|
|
// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText getInt} (40)
|
|
|
|
// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText getSelf} (40)
|
|
|
|
// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithInt}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x} (40)
|
|
|
|
// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y} (40)
|
2010-04-07 08:21:17 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:17:7 %s | FileCheck -check-prefix=CHECK-CC2 %s
|
2010-08-18 00:06:07 +08:00
|
|
|
// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText abc}
|
|
|
|
// CHECK-CC2-NEXT: ObjCInstanceMethodDecl:{TypedText getSelf}
|
2010-10-19 05:05:04 +08:00
|
|
|
// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText initWithInt}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}
|
2012-04-11 02:35:07 +08:00
|
|
|
// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y}
|
2010-04-07 08:21:17 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:24:7 %s | FileCheck -check-prefix=CHECK-CC3 %s
|
2010-08-18 00:06:07 +08:00
|
|
|
// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText abc}
|
|
|
|
// CHECK-CC3-NEXT: ObjCInstanceMethodDecl:{TypedText getSelf}
|
|
|
|
// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText init}
|
2010-10-19 05:05:04 +08:00
|
|
|
// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText initWithInt}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}
|
2012-04-11 02:35:07 +08:00
|
|
|
// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y}
|
2010-10-12 05:37:58 +08:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:33:3 %s | FileCheck -check-prefix=CHECK-CC4 %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText abc}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (42)
|
2010-08-18 00:06:07 +08:00
|
|
|
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText getInt}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
|
|
|
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText getSecondValue}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText getSelf}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (40)
|
2010-10-19 05:05:04 +08:00
|
|
|
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithInt}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2012-04-11 02:35:07 +08:00
|
|
|
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-19 05:05:04 +08:00
|
|
|
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText setValue}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-12 05:37:58 +08:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:33:8 %s | FileCheck -check-prefix=CHECK-CC5 %s
|
2012-09-27 00:39:56 +08:00
|
|
|
// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText getInt}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (42)
|
|
|
|
// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText getSecondValue}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (40)
|
2010-04-07 08:21:17 +08:00
|
|
|
// CHECK-CC5-NOT: {TypedText getSelf}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-19 05:05:04 +08:00
|
|
|
// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText setValue}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-12 05:37:58 +08:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:37:7 %s | FileCheck -check-prefix=CHECK-CC6 %s
|
2010-08-18 00:06:07 +08:00
|
|
|
// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText abc}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText getSelf}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (40)
|
2010-10-19 05:05:04 +08:00
|
|
|
// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText initWithInt}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2012-04-11 02:35:07 +08:00
|
|
|
// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-12 05:37:58 +08:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:42:3 %s | FileCheck -check-prefix=CHECK-CC7 %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC7: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText abc}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (42)
|
2010-10-19 05:05:04 +08:00
|
|
|
// CHECK-CC7: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText categoryFunction}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{LeftBrace {}{VerticalSpace
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC7: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText getSelf}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (42)
|
2010-10-12 05:37:58 +08:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:52:21 %s | FileCheck -check-prefix=CHECK-CC8 %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType id}{Informative first:}{TypedText second2:}{Text (float)y2}{HorizontalSpace }{TypedText third:}{Text (double)z} (35)
|
|
|
|
// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType void *}{Informative first:}{TypedText second3:}{Text (float)y3}{HorizontalSpace }{TypedText third:}{Text (double)z} (35)
|
|
|
|
// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative first:}{TypedText second:}{Text (float)y}{HorizontalSpace }{TypedText third:}{Text (double)z} (8)
|
2010-10-12 05:37:58 +08:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:52:19 %s | FileCheck -check-prefix=CHECK-CC9 %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CC9: NotImplemented:{TypedText x} (40)
|
|
|
|
// CHECK-CC9: NotImplemented:{TypedText xx} (40)
|
|
|
|
// CHECK-CC9: NotImplemented:{TypedText xxx} (40)
|
2010-10-12 05:37:58 +08:00
|
|
|
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:52:36 %s | FileCheck -check-prefix=CHECK-CCA %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCA: NotImplemented:{TypedText y2} (40)
|
2010-08-17 23:53:35 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:56:3 %s | FileCheck -check-prefix=CHECK-CCB %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCB: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText first}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second2:}{LeftParen (}{Text float}{RightParen )}{Text y}{HorizontalSpace }{TypedText third:}{LeftParen (}{Text double}{RightParen )}{Text z} (40)
|
2010-08-17 23:53:35 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:56:8 %s | FileCheck -check-prefix=CHECK-CCC %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCC: ObjCInstanceMethodDecl:{TypedText first}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second2:}{LeftParen (}{Text float}{RightParen )}{Text y}{HorizontalSpace }{TypedText third:}{LeftParen (}{Text double}{RightParen )}{Text z} (40)
|
2010-08-17 23:53:35 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:56:21 %s | FileCheck -check-prefix=CHECK-CCD %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType id}{Informative first:}{TypedText second2:}{Text (float)y2}{HorizontalSpace }{TypedText third:}{Text (double)z} (35)
|
|
|
|
// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType int}{Informative first:}{TypedText second2:}{Text (float)y}{HorizontalSpace }{TypedText third:}{Text (double)z} (8)
|
|
|
|
// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType void *}{Informative first:}{TypedText second3:}{Text (float)y3}{HorizontalSpace }{TypedText third:}{Text (double)z} (35)
|
|
|
|
// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType int}{Informative first:}{TypedText second:}{Text (float)y}{HorizontalSpace }{TypedText third:}{Text (double)z} (8)
|
2010-08-17 23:53:35 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:56:38 %s | FileCheck -check-prefix=CHECK-CCE %s
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCE: ObjCInstanceMethodDecl:{ResultType id}{Informative first:}{Informative second2:}{TypedText third:}{Text (double)z} (35)
|
|
|
|
// CHECK-CCE: ObjCInstanceMethodDecl:{ResultType int}{Informative first:}{Informative second2:}{TypedText third:}{Text (double)z} (8)
|
2010-08-24 09:06:58 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:60:4 %s | FileCheck -check-prefix=CHECK-CCF %s
|
2010-09-21 07:11:55 +08:00
|
|
|
// CHECK-CCF: ObjCInterfaceDecl:{TypedText A} (50)
|
|
|
|
// CHECK-CCF: ObjCInterfaceDecl:{TypedText B} (50)
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCF: NotImplemented:{TypedText bycopy} (40)
|
|
|
|
// CHECK-CCF: NotImplemented:{TypedText byref} (40)
|
|
|
|
// CHECK-CCF: NotImplemented:{TypedText in} (40)
|
|
|
|
// CHECK-CCF: NotImplemented:{TypedText inout} (40)
|
2015-06-20 02:27:52 +08:00
|
|
|
// CHECK-CCF: NotImplemented:{TypedText nonnull} (40)
|
|
|
|
// CHECK-CCF: NotImplemented:{TypedText nullable} (40)
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCF: NotImplemented:{TypedText oneway} (40)
|
|
|
|
// CHECK-CCF: NotImplemented:{TypedText out} (40)
|
2010-09-21 07:11:55 +08:00
|
|
|
// CHECK-CCF: NotImplemented:{TypedText unsigned} (50)
|
|
|
|
// CHECK-CCF: NotImplemented:{TypedText void} (50)
|
|
|
|
// CHECK-CCF: NotImplemented:{TypedText volatile} (50)
|
2010-08-24 09:06:58 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:60:11 %s | FileCheck -check-prefix=CHECK-CCG %s
|
2010-09-21 07:11:55 +08:00
|
|
|
// CHECK-CCG: ObjCInterfaceDecl:{TypedText A} (50)
|
|
|
|
// CHECK-CCG: ObjCInterfaceDecl:{TypedText B} (50)
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCG-NOT: NotImplemented:{TypedText bycopy} (40)
|
|
|
|
// CHECK-CCG-NOT: NotImplemented:{TypedText byref} (40)
|
|
|
|
// CHECK-CCG: NotImplemented:{TypedText in} (40)
|
|
|
|
// CHECK-CCG: NotImplemented:{TypedText inout} (40)
|
|
|
|
// CHECK-CCG-NOT: NotImplemented:{TypedText oneway} (40)
|
|
|
|
// CHECK-CCG: NotImplemented:{TypedText out} (40)
|
2010-09-21 07:11:55 +08:00
|
|
|
// CHECK-CCG: NotImplemented:{TypedText unsigned} (50)
|
|
|
|
// CHECK-CCG: NotImplemented:{TypedText void} (50)
|
|
|
|
// CHECK-CCG: NotImplemented:{TypedText volatile} (50)
|
2010-08-24 09:06:58 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:60:24 %s | FileCheck -check-prefix=CHECK-CCF %s
|
2016-07-27 22:56:59 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:60:27 %s | FileCheck -check-prefix=CHECK-CCH %s
|
2010-09-21 07:11:55 +08:00
|
|
|
// CHECK-CCH: ObjCInterfaceDecl:{TypedText A} (50)
|
|
|
|
// CHECK-CCH: ObjCInterfaceDecl:{TypedText B} (50)
|
2010-10-19 08:03:23 +08:00
|
|
|
// CHECK-CCH: NotImplemented:{TypedText bycopy} (40)
|
|
|
|
// CHECK-CCH: NotImplemented:{TypedText byref} (40)
|
|
|
|
// CHECK-CCH-NOT: NotImplemented:{TypedText in} (40)
|
|
|
|
// CHECK-CCH: NotImplemented:{TypedText inout} (40)
|
|
|
|
// CHECK-CCH: NotImplemented:{TypedText oneway} (40)
|
|
|
|
// CHECK-CCH: NotImplemented:{TypedText out} (40)
|
2010-09-21 07:11:55 +08:00
|
|
|
// CHECK-CCH: NotImplemented:{TypedText unsigned} (50)
|
|
|
|
// CHECK-CCH: NotImplemented:{TypedText void} (50)
|
|
|
|
// CHECK-CCH: NotImplemented:{TypedText volatile} (50)
|
2011-02-16 06:19:42 +08:00
|
|
|
|
|
|
|
// IBAction completion
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:5:4 %s | FileCheck -check-prefix=CHECK-IBACTION %s
|
|
|
|
// CHECK-IBACTION: NotImplemented:{TypedText IBAction}{RightParen )}{Placeholder selector}{Colon :}{LeftParen (}{Text id}{RightParen )}{Text sender} (40)
|
|
|
|
|
2011-02-19 06:29:55 +08:00
|
|
|
// <rdar://problem/8939352>
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:68:9 %s | FileCheck -check-prefix=CHECK-8939352 %s
|
|
|
|
// CHECK-8939352: ObjCInstanceMethodDecl:{TypedText method}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text y} (40)
|
2012-04-11 02:35:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:72:2 %s | FileCheck -check-prefix=CHECK-ONEWAY %s
|
2012-09-27 00:39:56 +08:00
|
|
|
// CHECK-ONEWAY: ObjCInstanceMethodDecl:{LeftParen (}{Text oneway }{Text void}{RightParen )}{TypedText method}{TypedText :}{LeftParen (}{Text in }{Text id}{RightParen )}{Text x} (40)
|
2014-03-05 14:47:57 +08:00
|
|
|
|
2014-03-06 03:10:31 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:85:2 %s | FileCheck -check-prefix=CHECK-CLASSTY %s
|
2014-03-05 14:47:57 +08:00
|
|
|
// CHECK-CLASSTY: ObjCInstanceMethodDecl:{LeftParen (}{Text Class<P1>}{RightParen )}{TypedText meth}
|
2015-07-07 11:57:35 +08:00
|
|
|
// CHECK-CLASSTY: ObjCInstanceMethodDecl:{LeftParen (}{Text MyObject<P1> *}{RightParen )}{TypedText meth2}
|
2014-03-06 03:10:31 +08:00
|
|
|
// CHECK-CLASSTY: ObjCInstanceMethodDecl:{LeftParen (}{Text MyObjectRef}{RightParen )}{TypedText meth3}
|
2015-06-20 02:27:52 +08:00
|
|
|
|
2015-07-29 01:38:51 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:96:2 %s -target x86_64-apple-macosx10.7 | FileCheck -check-prefix=CHECK-NULLABILITY %s
|
2015-07-25 01:00:19 +08:00
|
|
|
// CHECK-NULLABILITY: ObjCInstanceMethodDecl:{LeftParen (}{Text I2 *}{RightParen )}{TypedText produceI2}{TypedText :}{LeftParen (}{Text I2 *}{RightParen )}{Text i2} (40)
|
2015-07-29 01:38:51 +08:00
|
|
|
// CHECK-NULLABILITY: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText prop}
|
|
|
|
// CHECK-NULLABILITY: ObjCInstanceMethodDecl:{LeftParen (}{Text void (^)(int * _Nullable)}{RightParen )}{TypedText propWB}
|
|
|
|
// CHECK-NULLABILITY: ObjCInstanceMethodDecl:{LeftParen (}{Text void}{RightParen )}{TypedText setProp}{TypedText :}{LeftParen (}{Text id}{RightParen )}{Text prop}
|
|
|
|
// CHECK-NULLABILITY: ObjCInstanceMethodDecl:{LeftParen (}{Text void}{RightParen )}{TypedText setPropWB}{TypedText :}{LeftParen (}{Text void (^)(int * _Nullable)}{RightParen )}{Text propWB}
|
2015-07-25 01:00:19 +08:00
|
|
|
// CHECK-NULLABILITY: ObjCInstanceMethodDecl:{LeftParen (}{Text int * _Nullable *}{RightParen )}{TypedText something}{TypedText :}{LeftParen (}{Text void (^)(int * _Nullable)}{RightParen )}{Text b}
|
2015-07-07 14:20:31 +08:00
|
|
|
|
2015-07-29 01:38:51 +08:00
|
|
|
// RUN: c-index-test -code-completion-at=%s:107:2 %s -target x86_64-apple-macosx10.7 | FileCheck -check-prefix=CHECK-NULLABILITY2 %s
|
2015-07-25 01:00:19 +08:00
|
|
|
// CHECK-NULLABILITY2: ObjCInstanceMethodDecl:{LeftParen (}{Text instancetype}{RightParen )}{TypedText getI3} (40)
|
|
|
|
// CHECK-NULLABILITY2: ObjCInstanceMethodDecl:{LeftParen (}{Text I3 *}{RightParen )}{TypedText produceI3}{TypedText :}{LeftParen (}{Text I3 *}{RightParen )}{Text i3} (40)
|
2017-10-25 00:39:37 +08:00
|
|
|
|
|
|
|
@interface CompleteWithoutLeadingPrefix
|
|
|
|
|
|
|
|
- (void)aMethod;
|
|
|
|
+ (int)aClassMethod:(int)x;
|
|
|
|
@property int p;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation CompleteWithoutLeadingPrefix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:250:1 %s | FileCheck -check-prefix=CHECK-COMP-NO-PREFIX %s
|
|
|
|
// CHECK-COMP-NO-PREFIX: NotImplemented:{TypedText @end} (40)
|
|
|
|
// CHECK-COMP-NO-PREFIX: ObjCClassMethodDecl:{Text +}{HorizontalSpace }{LeftParen (}{Text int}{RightParen )}{TypedText aClassMethod}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x} (40)
|
|
|
|
// CHECK-COMP-NO-PREFIX: ObjCInstanceMethodDecl:{Text -}{HorizontalSpace }{LeftParen (}{Text void}{RightParen )}{TypedText aMethod} (40)
|
|
|
|
// CHECK-COMP-NO-PREFIX: ObjCInterfaceDecl:{TypedText I1}
|
|
|
|
// CHECK-COMP-NO-PREFIX: ObjCInstanceMethodDecl:{Text -}{HorizontalSpace }{LeftParen (}{Text int}{RightParen )}{TypedText p} (40)
|
|
|
|
// CHECK-COMP-NO-PREFIX: ObjCInstanceMethodDecl:{Text -}{HorizontalSpace }{LeftParen (}{Text void}{RightParen )}{TypedText setP}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text p} (40)
|