diff options
Diffstat (limited to 'test/Index')
42 files changed, 459 insertions, 38 deletions
diff --git a/test/Index/Core/Inputs/module/ModA.h b/test/Index/Core/Inputs/module/ModA.h new file mode 100644 index 000000000000..081d86cc4516 --- /dev/null +++ b/test/Index/Core/Inputs/module/ModA.h @@ -0,0 +1,2 @@ + +void ModA_func(void); diff --git a/test/Index/Core/Inputs/module/module.modulemap b/test/Index/Core/Inputs/module/module.modulemap new file mode 100644 index 000000000000..a132562eafd8 --- /dev/null +++ b/test/Index/Core/Inputs/module/module.modulemap @@ -0,0 +1 @@ +module ModA { header "ModA.h" export * } diff --git a/test/Index/Core/index-source.cpp b/test/Index/Core/index-source.cpp new file mode 100644 index 000000000000..75c6396da553 --- /dev/null +++ b/test/Index/Core/index-source.cpp @@ -0,0 +1,9 @@ +// RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s + +template <typename TemplArg> +class TemplCls { +// CHECK: [[@LINE-1]]:7 | class/C++ | TemplCls | c:@ST>1#T@TemplCls | <no-cgname> | Def | rel: 0 + TemplCls(int x); + // CHECK: [[@LINE-1]]:3 | constructor/C++ | TemplCls | c:@ST>1#T@TemplCls@F@TemplCls#I# | <no-cgname> | Decl,RelChild | rel: 1 + // CHECK-NEXT: RelChild | TemplCls | c:@ST>1#T@TemplCls +}; diff --git a/test/Index/Core/index-source.m b/test/Index/Core/index-source.m new file mode 100644 index 000000000000..2e9c01c02d48 --- /dev/null +++ b/test/Index/Core/index-source.m @@ -0,0 +1,107 @@ +// RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s + +@interface Base +// CHECK: [[@LINE-1]]:12 | class/ObjC | Base | c:objc(cs)Base | _OBJC_CLASS_$_Base | Decl | rel: 0 +-(void)meth; +// CHECK: [[@LINE-1]]:1 | instance-method/ObjC | meth | c:objc(cs)Base(im)meth | -[Base meth] | Decl,Dyn,RelChild | rel: 1 +// CHECK-NEXT: RelChild | Base | c:objc(cs)Base +@end + +void foo(); +// CHECK: [[@LINE+1]]:6 | function/C | goo | c:@F@goo | _goo | Def | rel: 0 +void goo(Base *b) { + // CHECK: [[@LINE+2]]:3 | function/C | foo | c:@F@foo | _foo | Ref,Call,RelCall | rel: 1 + // CHECK-NEXT: RelCall | goo | c:@F@goo + foo(); + // CHECK: [[@LINE+3]]:6 | instance-method/ObjC | meth | c:objc(cs)Base(im)meth | -[Base meth] | Ref,Call,Dyn,RelRec,RelCall | rel: 2 + // CHECK-NEXT: RelCall | goo | c:@F@goo + // CHECK-NEXT: RelRec | Base | c:objc(cs)Base + [b meth]; +} + +// CHECK: [[@LINE+1]]:11 | protocol/ObjC | Prot1 | c:objc(pl)Prot1 | <no-cgname> | Decl | rel: 0 +@protocol Prot1 +@end + +// CHECK: [[@LINE+3]]:11 | protocol/ObjC | Prot2 | c:objc(pl)Prot2 | <no-cgname> | Decl | rel: 0 +// CHECK: [[@LINE+2]]:17 | protocol/ObjC | Prot1 | c:objc(pl)Prot1 | <no-cgname> | Ref,RelBase | rel: 1 +// CHECK-NEXT: RelBase | Prot2 | c:objc(pl)Prot2 +@protocol Prot2<Prot1> +@end + +// CHECK: [[@LINE+7]]:12 | class/ObjC | Sub | c:objc(cs)Sub | _OBJC_CLASS_$_Sub | Decl | rel: 0 +// CHECK: [[@LINE+6]]:18 | class/ObjC | Base | c:objc(cs)Base | _OBJC_CLASS_$_Base | Ref,RelBase | rel: 1 +// CHECK-NEXT: RelBase | Sub | c:objc(cs)Sub +// CHECK: [[@LINE+4]]:23 | protocol/ObjC | Prot2 | c:objc(pl)Prot2 | <no-cgname> | Ref,RelBase | rel: 1 +// CHECK-NEXT: RelBase | Sub | c:objc(cs)Sub +// CHECK: [[@LINE+2]]:30 | protocol/ObjC | Prot1 | c:objc(pl)Prot1 | <no-cgname> | Ref,RelBase | rel: 1 +// CHECK-NEXT: RelBase | Sub | c:objc(cs)Sub +@interface Sub : Base<Prot2, Prot1> +@end + +@interface NSArray<ObjectType> : Base +// CHECK-NOT: ObjectType +-(ObjectType)getit; +@end + +// CHECK: [[@LINE+1]]:6 | function/C | over_func | c:@F@over_func#I# | __Z9over_funci | Decl | rel: 0 +void over_func(int x) __attribute__((overloadable)); +// CHECK: [[@LINE+1]]:6 | function/C | over_func | c:@F@over_func#f# | __Z9over_funcf | Decl | rel: 0 +void over_func(float x) __attribute__((overloadable)); + +// CHECK: [[@LINE+1]]:6 | enum/C | MyEnum | c:@E@MyEnum | <no-cgname> | Def | rel: 0 +enum MyEnum { + // CHECK: [[@LINE+2]]:3 | enumerator/C | EnumeratorInNamed | c:@E@MyEnum@EnumeratorInNamed | <no-cgname> | Def,RelChild | rel: 1 + // CHECK-NEXT: RelChild | MyEnum | c:@E@MyEnum + EnumeratorInNamed +}; + +// CHECK: [[@LINE+1]]:1 | enum/C | <no-name> | c:@Ea@One | <no-cgname> | Def | rel: 0 +enum { + // CHECK: [[@LINE+2]]:3 | enumerator/C | One | c:@Ea@One@One | <no-cgname> | Def,RelChild | rel: 1 + // CHECK-NEXT: RelChild | <no-name> | c:@Ea@One + One, + // CHECK: [[@LINE+2]]:3 | enumerator/C | Two | c:@Ea@One@Two | <no-cgname> | Def,RelChild | rel: 1 + // CHECK-NEXT: RelChild | <no-name> | c:@Ea@One + Two, +}; + +// CHECK: [[@LINE+1]]:13 | type-alias/C | jmp_buf | c:index-source.m@T@jmp_buf | <no-cgname> | Def | rel: 0 +typedef int jmp_buf[(18)]; +// CHECK: [[@LINE+2]]:12 | function/C | setjmp | c:@F@setjmp | _setjmp | Decl | rel: 0 +// CHECK: [[@LINE+1]]:19 | type-alias/C | jmp_buf | c:index-source.m@T@jmp_buf | <no-cgname> | Ref | rel: 0 +extern int setjmp(jmp_buf); + +@class I1; +@interface I1 +// CHECK: [[@LINE+1]]:1 | instance-method/ObjC | meth | c:objc(cs)I1(im)meth | -[I1 meth] | Decl,Dyn,RelChild | rel: 1 +-(void)meth; +@end + +@interface I2 +@property (readwrite) id prop; +@end + +// CHECK: [[@LINE+2]]:17 | field/ObjC | _prop | c:objc(cs)I2@_prop | <no-cgname> | Def,Impl,RelChild | rel: 1 +// CHECK-NEXT: RelChild | I2 | c:objc(cs)I2 +@implementation I2 +// CHECK: [[@LINE+5]]:13 | instance-property/ObjC | prop | c:objc(cs)I2(py)prop | <no-cgname> | Ref | rel: 0 +// CHECK: [[@LINE+4]]:13 | instance-method/ObjC | prop | c:objc(cs)I2(im)prop | -[I2 prop] | Def,RelChild | rel: 1 +// CHECK-NEXT: RelChild | I2 | c:objc(cs)I2 +// CHECK: [[@LINE+2]]:13 | instance-method/ObjC | setProp: | c:objc(cs)I2(im)setProp: | -[I2 setProp:] | Def,RelChild | rel: 1 +// CHECK-NEXT: RelChild | I2 | c:objc(cs)I2 +@synthesize prop = _prop; +@end + +@interface I3 +@property (readwrite) id prop; +-(id)prop; +-(void)setProp:(id)p; +@end + +@implementation I3 +// CHECK: [[@LINE+3]]:13 | instance-property/ObjC | prop | c:objc(cs)I3(py)prop | <no-cgname> | Ref | rel: 0 +// CHECK: [[@LINE+2]]:13 | instance-method/ObjC | prop | c:objc(cs)I3(im)prop | -[I3 prop] | Def,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:13 | instance-method/ObjC | setProp: | c:objc(cs)I3(im)setProp: | -[I3 setProp:] | Def,RelChild | rel: 1 +@synthesize prop = _prop; +@end diff --git a/test/Index/Core/index-source.mm b/test/Index/Core/index-source.mm new file mode 100644 index 000000000000..049a0bdaf647 --- /dev/null +++ b/test/Index/Core/index-source.mm @@ -0,0 +1,11 @@ +// RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s + +@interface MyCls +@end + +@protocol P1,P2; + +// CHECK: [[@LINE+1]]:6 | function/C | foo | c:@F@foo#*$objc(cs)MyCls# | __Z3fooP5MyCls | Decl | rel: 0 +void foo(MyCls *o); +// CHECK: [[@LINE+1]]:6 | function/C | foo | c:@F@foo#*Qoobjc(pl)P1objc(pl)P2# | __Z3fooPU15objcproto2P12P211objc_object | Decl | rel: 0 +void foo(id<P2, P1> o); diff --git a/test/Index/Core/index-subkinds.m b/test/Index/Core/index-subkinds.m new file mode 100644 index 000000000000..e668d84ffa89 --- /dev/null +++ b/test/Index/Core/index-subkinds.m @@ -0,0 +1,48 @@ +// RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s + +// CHECK: [[@LINE+1]]:12 | class/ObjC | XCTestCase | c:objc(cs)XCTestCase | _OBJC_CLASS_$_XCTestCase | Decl | rel: 0 +@interface XCTestCase +@end + +// CHECK: [[@LINE+1]]:12 | class(test)/ObjC | MyTestCase | c:objc(cs)MyTestCase | _OBJC_CLASS_$_MyTestCase | Decl | rel: 0 +@interface MyTestCase : XCTestCase +@end +// CHECK: [[@LINE+1]]:17 | class(test)/ObjC | MyTestCase | c:objc(cs)MyTestCase | <no-cgname> | Def | rel: 0 +@implementation MyTestCase +// CHECK: [[@LINE+1]]:1 | instance-method(test)/ObjC | testMe | c:objc(cs)MyTestCase(im)testMe | -[MyTestCase testMe] | Def,Dyn,RelChild | rel: 1 +-(void)testMe {} +// CHECK: [[@LINE+1]]:1 | instance-method/ObjC | testResult | c:objc(cs)MyTestCase(im)testResult | -[MyTestCase testResult] | Def,Dyn,RelChild | rel: 1 +-(id)testResult { return 0; } +// CHECK: [[@LINE+1]]:1 | instance-method/ObjC | testWithInt: | c:objc(cs)MyTestCase(im)testWithInt: | -[MyTestCase testWithInt:] | Def,Dyn,RelChild | rel: 1 +-(void)testWithInt:(int)i {} +@end + +// CHECK: [[@LINE+1]]:12 | class(test)/ObjC | SubTestCase | c:objc(cs)SubTestCase | _OBJC_CLASS_$_SubTestCase | Decl | rel: 0 +@interface SubTestCase : MyTestCase +@end +// CHECK: [[@LINE+1]]:17 | class(test)/ObjC | SubTestCase | c:objc(cs)SubTestCase | <no-cgname> | Def | rel: 0 +@implementation SubTestCase +// CHECK: [[@LINE+1]]:1 | instance-method(test)/ObjC | testIt2 | c:objc(cs)SubTestCase(im)testIt2 | -[SubTestCase testIt2] | Def,Dyn,RelChild | rel: 1 +-(void)testIt2 {} +@end + +// CHECK: [[@LINE+1]]:12 | extension/ObjC | cat | c:objc(cy)MyTestCase@cat | <no-cgname> | Decl | rel: 0 +@interface MyTestCase(cat) +@end +// CHECK: [[@LINE+1]]:17 | extension/ObjC | MyTestCase | c:objc(cy)MyTestCase@cat | <no-cgname> | Def | rel: 0 +@implementation MyTestCase(cat) +// CHECK: [[@LINE+1]]:1 | instance-method(test)/ObjC | testInCat | c:objc(cs)MyTestCase(im)testInCat | -[MyTestCase(cat) testInCat] | Def,Dyn,RelChild | rel: 1 +- (void)testInCat {} +@end + + +@class NSButton; +@interface IBCls +// CHECK: [[@LINE+2]]:34 | instance-method/ObjC | prop | c:objc(cs)IBCls(im)prop | -[IBCls prop] | Decl,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:34 | instance-property(IB)/ObjC | prop | c:objc(cs)IBCls(py)prop | <no-cgname> | Decl,RelChild | rel: 1 +@property (readonly) IBOutlet id prop; +// CHECK: [[@LINE+1]]:54 | instance-property(IB,IBColl)/ObjC | propColl | c:objc(cs)IBCls(py)propColl | <no-cgname> | Decl,RelChild | rel: 1 +@property (readonly) IBOutletCollection(NSButton) id propColl; +// CHECK: [[@LINE+1]]:1 | instance-method(IB)/ObjC | doIt | c:objc(cs)IBCls(im)doIt | -[IBCls doIt] | Decl,Dyn,RelChild | rel: 1 +-(IBAction)doIt; +@end diff --git a/test/Index/Core/index-with-module.m b/test/Index/Core/index-with-module.m new file mode 100644 index 000000000000..03fd5cd5b8d3 --- /dev/null +++ b/test/Index/Core/index-with-module.m @@ -0,0 +1,12 @@ +// RUN: rm -rf %t.mcp +// RUN: c-index-test core -print-source-symbols -- %s -I %S/Inputs/module -fmodules -fmodules-cache-path=%t.mcp | FileCheck %s + +// CHECK: [[@LINE+1]]:9 | module/C | ModA | Decl | +@import ModA; +// CHECK: [[@LINE+1]]:1 | module/C | ModA | Decl,Impl | +#include "ModA.h" + +void foo() { + // CHECK: [[@LINE+1]]:3 | function/C | ModA_func | c:@F@ModA_func | {{.*}} | Ref,Call,RelCall | rel: 1 + ModA_func(); +} diff --git a/test/Index/Inputs/module.map b/test/Index/Inputs/module.map index 4bfc109a8b13..10712accb1c2 100644 --- a/test/Index/Inputs/module.map +++ b/test/Index/Inputs/module.map @@ -6,3 +6,17 @@ module ModuleNeedsVFS { framework module * { } module ModuleUndef { header "module-undef.h" } + +module PreambleWithImplicitImport { + module A { + header "preamble-with-implicit-import-A.h" + } + module B { + header "preamble-with-implicit-import-B.h" + export * + } + module C { + header "preamble-with-implicit-import-C.h" + export * + } +} diff --git a/test/Index/Inputs/preamble-with-implicit-import-A.h b/test/Index/Inputs/preamble-with-implicit-import-A.h new file mode 100644 index 000000000000..c68390159094 --- /dev/null +++ b/test/Index/Inputs/preamble-with-implicit-import-A.h @@ -0,0 +1 @@ +// preamble-with-implicit-import-A diff --git a/test/Index/Inputs/preamble-with-implicit-import-B.h b/test/Index/Inputs/preamble-with-implicit-import-B.h new file mode 100644 index 000000000000..17c138dfb5aa --- /dev/null +++ b/test/Index/Inputs/preamble-with-implicit-import-B.h @@ -0,0 +1,3 @@ +#pragma once +#include "preamble-with-implicit-import-C.h" // Circular +typedef struct { char x; } Typo; diff --git a/test/Index/Inputs/preamble-with-implicit-import-C.h b/test/Index/Inputs/preamble-with-implicit-import-C.h new file mode 100644 index 000000000000..a3fc1d4fea06 --- /dev/null +++ b/test/Index/Inputs/preamble-with-implicit-import-C.h @@ -0,0 +1,2 @@ +#pragma once +#include "preamble-with-implicit-import-B.h" // Circular diff --git a/test/Index/Inputs/preamble-with-implicit-import.h b/test/Index/Inputs/preamble-with-implicit-import.h new file mode 100644 index 000000000000..1b429678f213 --- /dev/null +++ b/test/Index/Inputs/preamble-with-implicit-import.h @@ -0,0 +1,4 @@ +#include "preamble-with-implicit-import-A.h" + +// Typo is defined in B, which is not imported. +void useTypeFromB(Typo *); diff --git a/test/Index/annotate-comments-availability-attrs.cpp b/test/Index/annotate-comments-availability-attrs.cpp index 74a57b9beeb2..f31c4e16ccd6 100644 --- a/test/Index/annotate-comments-availability-attrs.cpp +++ b/test/Index/annotate-comments-availability-attrs.cpp @@ -13,12 +13,12 @@ void attr_availability_1() __attribute__((availability(macosx,obsoleted=10.0,introduced=8.0,deprecated=9.0, message="use availability_test in <foo.h>"))) __attribute__((availability(ios,unavailable, message="not for iOS"))); -// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-3]]" column="6"><Name>attr_availability_1</Name><USR>c:@F@attr_availability_1#</USR><Declaration>void attr_availability_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="iOS"><DeprecationSummary>not for iOS</DeprecationSummary><Unavailable/></Availability><Availability distribution="OS X"><IntroducedInVersion>8.0</IntroducedInVersion><DeprecatedInVersion>9.0</DeprecatedInVersion><RemovedAfterVersion>10.0</RemovedAfterVersion><DeprecationSummary>use availability_test in <foo.h></DeprecationSummary></Availability></Function>] +// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-3]]" column="6"><Name>attr_availability_1</Name><USR>c:@F@attr_availability_1#</USR><Declaration>void attr_availability_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="iOS"><DeprecationSummary>not for iOS</DeprecationSummary><Unavailable/></Availability><Availability distribution="macOS"><IntroducedInVersion>8.0</IntroducedInVersion><DeprecatedInVersion>9.0</DeprecatedInVersion><RemovedAfterVersion>10.0</RemovedAfterVersion><DeprecationSummary>use availability_test in <foo.h></DeprecationSummary></Availability></Function>] /// Aaa. void attr_availability_2() __attribute__((availability(macosx,obsoleted=10.0.1,introduced=8.0.1,deprecated=9.0.1))); -// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-2]]" column="6"><Name>attr_availability_2</Name><USR>c:@F@attr_availability_2#</USR><Declaration>void attr_availability_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="OS X"><IntroducedInVersion>8.0.1</IntroducedInVersion><DeprecatedInVersion>9.0.1</DeprecatedInVersion><RemovedAfterVersion>10.0.1</RemovedAfterVersion></Availability></Function>] +// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-2]]" column="6"><Name>attr_availability_2</Name><USR>c:@F@attr_availability_2#</USR><Declaration>void attr_availability_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="macOS"><IntroducedInVersion>8.0.1</IntroducedInVersion><DeprecatedInVersion>9.0.1</DeprecatedInVersion><RemovedAfterVersion>10.0.1</RemovedAfterVersion></Availability></Function>] /// Aaa. void attr_deprecated_1() __attribute__((deprecated)); diff --git a/test/Index/annotate-tokens.c b/test/Index/annotate-tokens.c index 2f95ca6f458c..c72e4f725fcc 100644 --- a/test/Index/annotate-tokens.c +++ b/test/Index/annotate-tokens.c @@ -80,10 +80,10 @@ void test() { // CHECK: Punctuation: "(" [5:3 - 5:4] CStyleCastExpr= // CHECK: Keyword: "void" [5:4 - 5:8] CStyleCastExpr= // CHECK: Punctuation: ")" [5:8 - 5:9] CStyleCastExpr= -// CHECK: Keyword: "sizeof" [5:9 - 5:15] UnexposedExpr= -// CHECK: Punctuation: "(" [5:15 - 5:16] UnexposedExpr= +// CHECK: Keyword: "sizeof" [5:9 - 5:15] UnaryExpr= +// CHECK: Punctuation: "(" [5:15 - 5:16] UnaryExpr= // CHECK: Identifier: "T" [5:16 - 5:17] TypeRef=T:1:13 -// CHECK: Punctuation: ")" [5:17 - 5:18] UnexposedExpr= +// CHECK: Punctuation: ")" [5:17 - 5:18] UnaryExpr= // CHECK: Punctuation: ";" [5:18 - 5:19] CompoundStmt= // CHECK: Keyword: "struct" [7:3 - 7:9] VarDecl=x:7:12 (Definition) // CHECK: Identifier: "X" [7:10 - 7:11] TypeRef=struct X:2:8 diff --git a/test/Index/availability.c b/test/Index/availability.c index cfe0ff5bea81..b9d2c6f449c1 100644 --- a/test/Index/availability.c +++ b/test/Index/availability.c @@ -14,7 +14,7 @@ enum { // RUN: FileCheck -check-prefix=CHECK-1 %s < %t // RUN: FileCheck -check-prefix=CHECK-2 %s < %t // CHECK-1: (ios, introduced=3.2, deprecated=4.1) -// CHECK-2: (macosx, introduced=10.4, deprecated=10.5, obsoleted=10.7) +// CHECK-2: (macos, introduced=10.4, deprecated=10.5, obsoleted=10.7) // CHECK-2: EnumConstantDecl=old_enum:6:3 (Definition) (deprecated) -// CHECK-2: EnumConstantDecl=old_enum_plat:10:3 {{.*}} (macosx, introduced=10.4, deprecated=10.5, obsoleted=10.7) +// CHECK-2: EnumConstantDecl=old_enum_plat:10:3 {{.*}} (macos, introduced=10.4, deprecated=10.5, obsoleted=10.7) diff --git a/test/Index/availability.cpp b/test/Index/availability.cpp index d6f90385f0bc..d8cd3bfb6541 100644 --- a/test/Index/availability.cpp +++ b/test/Index/availability.cpp @@ -10,4 +10,4 @@ struct Foo { // CHECK: FunctionDecl=foo:1:6 (unavailable) [type=void ()] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0] // CHECK: StructDecl=Foo:3:8 (Definition) [type=Foo] [typekind=Record] [isPOD=1] // CHECK: CXXMethod=foo:4:7 (unavailable) [type=int (){{.*}}] [typekind=FunctionProto] [resulttype=int] [resulttypekind=Int] [isPOD=0] -// CHECK: CXXConstructor=Foo:5:3 (unavailable) [type=void (){{.*}}] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0] +// CHECK: CXXConstructor=Foo:5:3 (unavailable) (default constructor) [type=void (){{.*}}] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0] diff --git a/test/Index/c-index-api-loadTU-test.m b/test/Index/c-index-api-loadTU-test.m index 29c37397673a..52f3a56d9800 100644 --- a/test/Index/c-index-api-loadTU-test.m +++ b/test/Index/c-index-api-loadTU-test.m @@ -73,6 +73,7 @@ struct X0 {}; @interface TestAttributes() // <rdar://problem/9561076> @property (retain) IBOutlet id anotherOutlet; +@property (class) int cProp; @end // CHECK: c-index-api-loadTU-test.m:4:12: ObjCInterfaceDecl=Foo:4:12 Extent=[4:1 - 12:5] @@ -167,7 +168,7 @@ struct X0 {}; // CHECK: c-index-api-loadTU-test.m:69:16: TypeRef=struct X0:71:8 Extent=[69:16 - 69:18] // CHECK: c-index-api-loadTU-test.m:70:8: StructDecl=X0:70:8 Extent=[70:1 - 70:10] // CHECK: c-index-api-loadTU-test.m:71:8: StructDecl=X0:71:8 (Definition) Extent=[71:1 - 71:14] -// CHECK: c-index-api-loadTU-test.m:73:12: ObjCCategoryDecl=:73:12 Extent=[73:1 - 76:5] +// CHECK: c-index-api-loadTU-test.m:73:12: ObjCCategoryDecl=:73:12 Extent=[73:1 - 77:5] // CHECK: c-index-api-loadTU-test.m:73:12: ObjCClassRef=TestAttributes:62:12 Extent=[73:12 - 73:26] // CHECK: c-index-api-loadTU-test.m:75:32: ObjCPropertyDecl=anotherOutlet:75:32 [retain,] Extent=[75:1 - 75:45] // CHECK: c-index-api-loadTU-test.m:75:20: attribute(iboutlet)= Extent=[75:20 - 75:28] @@ -175,3 +176,7 @@ struct X0 {}; // CHECK: c-index-api-loadTU-test.m:75:32: ObjCInstanceMethodDecl=anotherOutlet:75:32 Extent=[75:32 - 75:45] // CHECK: c-index-api-loadTU-test.m:75:32: ObjCInstanceMethodDecl=setAnotherOutlet::75:32 Extent=[75:32 - 75:45] // CHECK: c-index-api-loadTU-test.m:75:32: ParmDecl=anotherOutlet:75:32 (Definition) Extent=[75:32 - 75:45] +// CHECK: c-index-api-loadTU-test.m:76:23: ObjCPropertyDecl=cProp:76:23 [class,] Extent=[76:1 - 76:28] +// CHECK: c-index-api-loadTU-test.m:76:23: ObjCClassMethodDecl=cProp:76:23 Extent=[76:23 - 76:28] +// CHECK: c-index-api-loadTU-test.m:76:23: ObjCClassMethodDecl=setCProp::76:23 Extent=[76:23 - 76:28] +// CHECK: c-index-api-loadTU-test.m:76:23: ParmDecl=cProp:76:23 (Definition) Extent=[76:23 - 76:28] diff --git a/test/Index/evaluate-cursor.cpp b/test/Index/evaluate-cursor.cpp new file mode 100644 index 000000000000..28a9c368795a --- /dev/null +++ b/test/Index/evaluate-cursor.cpp @@ -0,0 +1,30 @@ +// Test is line- and column-sensitive. Run lines are below. + +struct Foo { + int x = 10; +}; + +void foo() { + int p = 11; +} + +#define FUNC_MAC(x) x + +void goo() { + int p = FUNC_MAC(1); + int a = __LINE__; +} + +// RUN: c-index-test -evaluate-cursor-at=%s:4:7 \ +// RUN: -evaluate-cursor-at=%s:8:7 \ +// RUN: -evaluate-cursor-at=%s:8:11 -std=c++11 %s | FileCheck %s +// CHECK: Value: 10 +// CHECK: Value: 11 +// CHECK: Value: 11 + +// RUN: c-index-test -get-macro-info-cursor-at=%s:11:9 \ +// RUN: -get-macro-info-cursor-at=%s:14:11 \ +// RUN: -get-macro-info-cursor-at=%s:15:11 -std=c++11 %s | FileCheck -check-prefix=CHECK-MACRO %s +// CHECK-MACRO: [function macro] +// CHECK-MACRO: [function macro] +// CHECK-MACRO: [builtin macro] diff --git a/test/Index/file-refs.cpp b/test/Index/file-refs.cpp index a96d27c63071..c5a728b434e6 100644 --- a/test/Index/file-refs.cpp +++ b/test/Index/file-refs.cpp @@ -59,7 +59,7 @@ void f() { // RUN: -file-refs-at=%s:2:9 \ // CHECK-NEXT: ClassDecl=C:2:9 (Definition) // CHECK-NEXT: ClassDecl=C:2:9 (Definition) =[2:9 - 2:10] -// CHECK-NEXT: CXXConstructor=C:4:5 (Definition) =[4:5 - 4:6] +// CHECK-NEXT: CXXConstructor=C:4:5 (Definition) (default constructor) =[4:5 - 4:6] // CHECK-NEXT: TypeRef=class NS::C:2:9 =[9:10 - 9:11] // CHECK-NEXT: TypeRef=class NS::C:2:9 =[10:3 - 10:4] // CHECK-NEXT: TypeRef=class NS::C:2:9 =[15:7 - 15:8] @@ -69,7 +69,7 @@ void f() { // RUN: -file-refs-at=%s:16:18 \ // CHECK-NEXT: CallExpr=C:4:5 // CHECK-NEXT: ClassDecl=C:2:9 (Definition) =[2:9 - 2:10] -// CHECK-NEXT: CXXConstructor=C:4:5 (Definition) =[4:5 - 4:6] +// CHECK-NEXT: CXXConstructor=C:4:5 (Definition) (default constructor) =[4:5 - 4:6] // CHECK-NEXT: TypeRef=class NS::C:2:9 =[9:10 - 9:11] // CHECK-NEXT: TypeRef=class NS::C:2:9 =[10:3 - 10:4] // CHECK-NEXT: TypeRef=class NS::C:2:9 =[15:7 - 15:8] @@ -91,7 +91,7 @@ void f() { // CHECK-NEXT: CallExpr=S:35:3 // CHECK-NEXT: StructDecl=S:34:8 (Definition) =[34:8 - 34:9] // CHECK-NEXT: CXXConstructor=S:35:3 =[35:3 - 35:4] -// CHECK-NEXT: CXXConstructor=S:36:3 =[36:3 - 36:4] +// CHECK-NEXT: CXXConstructor=S:36:3 (default constructor) =[36:3 - 36:4] // CHECK-NEXT: TypeRef=struct Test2::S:34:8 =[39:9 - 39:10] // CHECK-NEXT: TypeRef=struct Test2::S:34:8 =[43:14 - 43:15] diff --git a/test/Index/get-cursor.cpp b/test/Index/get-cursor.cpp index 60aab5f7ed79..a2c46937e48e 100644 --- a/test/Index/get-cursor.cpp +++ b/test/Index/get-cursor.cpp @@ -208,7 +208,7 @@ void test(TestColl coll) { // CHECK-TEMPLSPEC: 66:23 ClassDecl=TC:66:23 (Definition) [Specialization of TC:59:7] Extent=[66:1 - 66:31] Spelling=TC ([66:23 - 66:25]) // RUN: c-index-test -cursor-at=%s:69:3 -cursor-at=%s:70:11 -cursor-at=%s:73:6 -cursor-at=%s:74:6 -cursor-at=%s:77:8 -cursor-at=%s:78:8 -cursor-at=%s:79:8 -cursor-at=%s:80:8 -cursor-at=%s:81:8 -cursor-at=%s:82:8 -cursor-at=%s:85:6 -cursor-at=%s:86:6 -cursor-at=%s:87:6 -cursor-at=%s:88:6 -cursor-at=%s:91:5 -cursor-at=%s:92:5 -cursor-at=%s:93:5 -cursor-at=%s:94:5 -cursor-at=%s:95:5 -cursor-at=%s:96:5 -cursor-at=%s:97:5 -cursor-at=%s:98:5 -cursor-at=%s:100:5 -cursor-at=%s:101:5 -cursor-at=%s:104:6 -cursor-at=%s:105:6 -cursor-at=%s:106:6 -cursor-at=%s:107:6 -cursor-at=%s:108:6 -cursor-at=%s:109:6 -cursor-at=%s:110:6 -cursor-at=%s:111:6 -cursor-at=%s:113:6 -cursor-at=%s:114:6 -cursor-at=%s:117:8 -cursor-at=%s:118:8 -cursor-at=%s:120:8 -cursor-at=%s:121:8 -cursor-at=%s:122:8 -cursor-at=%s:123:8 -cursor-at=%s:124:8 -cursor-at=%s:125:8 -cursor-at=%s:128:6 -cursor-at=%s:129:6 -cursor-at=%s:130:6 -cursor-at=%s:132:3 -std=c++11 %s | FileCheck -check-prefix=CHECK-SPELLING %s -// CHECK-SPELLING: 69:3 CXXConstructor=A:69:3 Extent=[69:3 - 69:6] Spelling=A ([69:3 - 69:4]) +// CHECK-SPELLING: 69:3 CXXConstructor=A:69:3 (default constructor) Extent=[69:3 - 69:6] Spelling=A ([69:3 - 69:4]) // CHECK-SPELLING: 70:11 CXXDestructor=~A:70:11 (virtual) Extent=[70:3 - 70:15] Spelling=~A ([70:11 - 70:13]) // CHECK-SPELLING: 73:6 CXXMethod=operator=:73:6 Extent=[73:3 - 73:25] Spelling=operator= ([73:6 - 73:15]) // CHECK-SPELLING: 74:6 CXXMethod=operator=:74:6 Extent=[74:3 - 74:29] Spelling=operator= ([74:6 - 74:15]) diff --git a/test/Index/index-decls.m b/test/Index/index-decls.m index a405abc78c88..a39d9e3bfa6b 100644 --- a/test/Index/index-decls.m +++ b/test/Index/index-decls.m @@ -48,6 +48,13 @@ int test1() { } @end +// rdar://25372906 +@class I5; +@interface I5 +-(void)meth; +@property (class) int c; +@end + // RUN: c-index-test -index-file %s -target x86_64-apple-macosx10.7 > %t // RUN: FileCheck %s -input-file=%t // CHECK: [indexDeclaration]: kind: objc-class | name: I | {{.*}} | loc: 1:12 @@ -71,5 +78,9 @@ int test1() { // CHECK: [indexEntityReference]: kind: function | name: extfn | {{.*}} | loc: 33:10 // CHECK: [indexDeclaration]: kind: objc-class | name: I4 | {{.*}} | loc: 36:12 +// CHECK: [indexEntityReference]: kind: objc-property | name: prop | {{.*}} | cursor: ObjCSynthesizeDecl=prop:37:34 (Definition) | loc: 43:13 | <parent>:: kind: objc-class | name: I4 | {{.*}} | container: [I4:42:17] | refkind: direct // CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 37: // CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 43: + +// CHECK: [indexDeclaration]: kind: objc-instance-method | name: meth | {{.*}} loc: 54:1 | {{.*}} | isRedecl: 0 | isDef: 0 | +// CHECK: [indexDeclaration]: kind: objc-property | name: c | USR: c:objc(cs)I5(cpy)c | lang: ObjC | cursor: ObjCPropertyDecl=c:55:23 [class,] | loc: 55:23 diff --git a/test/Index/index-file.cpp b/test/Index/index-file.cpp index f1ae68a2508d..f2dbabbae7b5 100644 --- a/test/Index/index-file.cpp +++ b/test/Index/index-file.cpp @@ -27,7 +27,18 @@ template class A<int>; class B { mutable int x_; int y_; + + B() = default; + B(int); + explicit B(double); + B(const B&); + B(B&&); +}; + +class C { + explicit C(const C&); }; + // RUN: c-index-test -index-file %s > %t // RUN: FileCheck %s -input-file=%t @@ -37,3 +48,9 @@ class B { // CHECK: [indexDeclaration]: kind: c++-instance-method | name: meth | {{.*}} | loc: 23:26 // CHECK: [indexDeclaration]: kind: field | name: x_ | USR: c:@S@B@FI@x_ | lang: C++ | cursor: FieldDecl=x_:28:15 (Definition) (mutable) | loc: 28:15 | semantic-container: [B:27:7] | lexical-container: [B:27:7] | isRedecl: 0 | isDef: 1 | isContainer: 0 | isImplicit: 0 // CHECK: [indexDeclaration]: kind: field | name: y_ | USR: c:@S@B@FI@y_ | lang: C++ | cursor: FieldDecl=y_:29:7 (Definition) | loc: 29:7 | semantic-container: [B:27:7] | lexical-container: [B:27:7] | isRedecl: 0 | isDef: 1 | isContainer: 0 | isImplicit: 0 +// CHECK: [indexDeclaration]: kind: constructor | name: B | {{.*}} (default constructor) (defaulted) | loc: 31:3 +// CHECK: [indexDeclaration]: kind: constructor | name: B | {{.*}} (converting constructor) | loc: 32:3 +// CHECK: [indexDeclaration]: kind: constructor | name: B | {{.*}} | loc: 33:12 +// CHECK: [indexDeclaration]: kind: constructor | name: B | {{.*}} (copy constructor) (converting constructor) | loc: 34:3 +// CHECK: [indexDeclaration]: kind: constructor | name: B | {{.*}} (move constructor) (converting constructor) | loc: 35:3 +// CHECK: [indexDeclaration]: kind: constructor | name: C | {{.*}} (copy constructor) | loc: 39:12 diff --git a/test/Index/index-many-logical-ops.c b/test/Index/index-many-logical-ops.c index 0fd4e75236f1..7940a21a39b7 100644 --- a/test/Index/index-many-logical-ops.c +++ b/test/Index/index-many-logical-ops.c @@ -4,7 +4,7 @@ // Check that we don't get stack overflow trying to index a huge number of // logical operators. -// UBSan increses stack usage. +// UBSan increases stack usage. // REQUIRES: not_ubsan // CHECK: [indexDeclaration]: kind: function | name: foo diff --git a/test/Index/index-module.m b/test/Index/index-module.m index ff512592b670..d1c0b36b389e 100644 --- a/test/Index/index-module.m +++ b/test/Index/index-module.m @@ -3,9 +3,11 @@ @import DependsOnModule; int glob; -// RUN: rm -rf %t.cache +// RUN: rm -rf %t.cache %t.cache.sys // RUN: c-index-test -index-file %s -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs \ // RUN: -Xclang -fdisable-module-hash | FileCheck %s +// RUN: c-index-test -index-file %s -fmodules-cache-path=%t.cache.sys -fmodules -iframework %S/../Modules/Inputs \ +// RUN: -Xclang -fdisable-module-hash | FileCheck %s // RUN: c-index-test -index-file %s -fmodules-cache-path=%t.cache -fmodules -gmodules -F %S/../Modules/Inputs \ // RUN: -Xclang -fdisable-module-hash | FileCheck %s @@ -18,6 +20,7 @@ int glob; // CHECK-NOT: [indexDeclaration] // RUN: c-index-test -index-tu %t.cache/DependsOnModule.pcm | FileCheck %s -check-prefix=CHECK-DMOD +// RUN: c-index-test -index-tu %t.cache.sys/DependsOnModule.pcm | FileCheck %s -check-prefix=CHECK-DMOD-AST // CHECK-DMOD: [startedTranslationUnit] // CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_MODULE_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Headers[/\\]DependsOnModule\.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule @@ -27,7 +30,7 @@ int glob; // CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_SUB_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Frameworks[/\\]SubFramework\.framework[/\\]Headers[/\\]SubFramework\.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule.SubFramework // CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_SUB_OTHER_H:.*/Modules/Inputs/DependsOnModule.framework[/\\]Frameworks/SubFramework\.framework/Headers/Other\.h]] | name: "SubFramework/Other.h" | hash loc: [[DMOD_SUB_H]]:1:1 | isImport: 0 | isAngled: 0 | isModule: 0 | module: DependsOnModule.SubFramework.Other // CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_PRIVATE_H:.*/Modules/Inputs/DependsOnModule.framework[/\\]PrivateHeaders[/\\]DependsOnModulePrivate.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule.Private.DependsOnModule -// CHECK-DMOD-NEXT: [importedASTFile]: {{.*}}.cache{{[/\\]}}Module.pcm | loc: [[DMOD_MODULE_H]]:1:1 | name: "Module" | isImplicit: 1 +// CHECK-DMOD-NEXT: [importedASTFile]: {{.*}}.cache{{(.sys)?[/\\]}}Module.pcm | loc: [[DMOD_MODULE_H]]:1:1 | name: "Module" | isImplicit: 1 // CHECK-DMOD-NEXT: [indexDeclaration]: kind: variable | name: depends_on_module_other | {{.*}} | loc: [[DMOD_OTHER_H]]:1:5 // CHECK-DMOD-NEXT: [indexDeclaration]: kind: variable | name: template | {{.*}} | loc: [[DMOD_NOT_CXX_H]]:1:12 // CHECK-DMOD-NEXT: [indexDeclaration]: kind: variable | name: sub_framework | {{.*}} | loc: [[DMOD_SUB_H]]:2:8 @@ -35,6 +38,8 @@ int glob; // CHECK-DMOD-NEXT: [indexDeclaration]: kind: variable | name: depends_on_module_private | {{.*}} | loc: [[DMOD_PRIVATE_H]]:1:5 // CHECK-DMOD-NOT: [indexDeclaration] +// CHECK-DMOD-AST: [importedASTFile]: {{.*}}.cache.sys{{[/\\]}}Module.pcm | loc: {{.*}}DependsOnModule.h:1:1 | name: "Module" | isImplicit: 1 + // RUN: c-index-test -index-tu %t.cache/Module.pcm | FileCheck %s -check-prefix=CHECK-TMOD // CHECK-TMOD: [startedTranslationUnit] diff --git a/test/Index/index-refs.cpp b/test/Index/index-refs.cpp index adbf02a7c6e2..5a1ba1e8b43a 100644 --- a/test/Index/index-refs.cpp +++ b/test/Index/index-refs.cpp @@ -69,6 +69,8 @@ void foo5() { struct S2 s = { .y = 1, .x = 4}; } +int ginitlist[] = {EnumVal}; + // RUN: c-index-test -index-file %s | FileCheck %s // CHECK: [indexDeclaration]: kind: namespace | name: NS // CHECK-NEXT: [indexDeclaration]: kind: variable | name: gx @@ -119,3 +121,9 @@ void foo5() { // CHECK: [indexEntityReference]: kind: field | name: y | {{.*}} | loc: 69:20 // CHECK-NEXT: [indexEntityReference]: kind: field | name: x | {{.*}} | loc: 69:28 +// CHECK-NOT: [indexEntityReference]: kind: field | name: y | {{.*}} | loc: 69:20 +// CHECK-NOT: [indexEntityReference]: kind: field | name: x | {{.*}} | loc: 69:28 + +// CHECK: [indexDeclaration]: kind: variable | name: ginitlist | +// CHECK: [indexEntityReference]: kind: enumerator | name: EnumVal | {{.*}} | loc: 72:20 +// CHECK-NOT: [indexEntityReference]: kind: enumerator | name: EnumVal | {{.*}} | loc: 72:20 diff --git a/test/Index/index-refs.m b/test/Index/index-refs.m index f25013b882f6..457712bcbc7e 100644 --- a/test/Index/index-refs.m +++ b/test/Index/index-refs.m @@ -21,7 +21,12 @@ void foo2() { [I clsMeth]; } +@protocol ForwardProt; + // RUN: c-index-test -index-file %s | FileCheck %s // CHECK: [indexEntityReference]: kind: objc-protocol | name: Prot | {{.*}} | loc: 12:27 // CHECK: [indexEntityReference]: kind: struct | name: FooS | {{.*}} | loc: 13:18 // CHECK: [indexEntityReference]: kind: objc-class | name: I | {{.*}} | loc: 21:4 + +// CHECK: [indexDeclaration]: kind: objc-protocol | name: ForwardProt | {{.*}} | loc: 24:11 +// CHECK-NEXT: <ObjCContainerInfo>: kind: forward-ref diff --git a/test/Index/keep-going.cpp b/test/Index/keep-going.cpp new file mode 100644 index 000000000000..a25d1c4b0412 --- /dev/null +++ b/test/Index/keep-going.cpp @@ -0,0 +1,29 @@ +#include "missing1.h" + +template<class T> +class A { T a; }; + +class B : public A<int> { }; + +#include "missing2.h" + +class C : public A<float> { }; + +// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_KEEP_GOING=1 c-index-test -test-print-type %s -std=c++03 2> %t.stderr.txt | FileCheck %s +// RUN: FileCheck -check-prefix CHECK-DIAG %s < %t.stderr.txt + +// CHECK: inclusion directive=missing1.h ((null)) [type=] [typekind=Invalid] [isPOD=0] +// CHECK: inclusion directive=missing2.h ((null)) [type=] [typekind=Invalid] [isPOD=0] +// CHECK: ClassTemplate=A:4:7 (Definition) [type=] [typekind=Invalid] [isPOD=0] +// CHECK: TemplateTypeParameter=T:3:16 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] +// CHECK: FieldDecl=a:4:13 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] +// CHECK: TypeRef=T:3:16 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] +// CHECK: ClassDecl=B:6:7 (Definition) [type=B] [typekind=Record] [isPOD=0] +// CHECK: C++ base class specifier=A<int>:4:7 [access=public isVirtual=false] [type=A<int>] [typekind=Unexposed] [canonicaltype=A<int>] [canonicaltypekind=Record] [templateargs/1= [type=int] [typekind=Int]] [isPOD=0] [nbFields=1] +// CHECK: TemplateRef=A:4:7 [type=] [typekind=Invalid] [isPOD=0] +// CHECK: ClassDecl=C:10:7 (Definition) [type=C] [typekind=Record] [isPOD=0] +// CHECK: C++ base class specifier=A<float>:4:7 [access=public isVirtual=false] [type=A<float>] [typekind=Unexposed] [canonicaltype=A<float>] [canonicaltypekind=Record] [templateargs/1= [type=float] [typekind=Float]] [isPOD=0] [nbFields=1] +// CHECK: TemplateRef=A:4:7 [type=] [typekind=Invalid] [isPOD=0] + +// CHECK-DIAG: keep-going.cpp:1:10: error: 'missing1.h' file not found +// CHECK-DIAG: keep-going.cpp:8:10: error: 'missing2.h' file not found diff --git a/test/Index/load-classes.cpp b/test/Index/load-classes.cpp index 3b66be5398af..f527db521089 100644 --- a/test/Index/load-classes.cpp +++ b/test/Index/load-classes.cpp @@ -25,10 +25,10 @@ X::X(int value) { // RUN: c-index-test -test-load-source all %s | FileCheck %s // CHECK: load-classes.cpp:3:8: StructDecl=X:3:8 (Definition) Extent=[3:1 - 21:2] -// CHECK: load-classes.cpp:4:3: CXXConstructor=X:4:3 Extent=[4:3 - 4:15] [access=public] +// CHECK: load-classes.cpp:4:3: CXXConstructor=X:4:3 (converting constructor) Extent=[4:3 - 4:15] [access=public] // FIXME: missing TypeRef in the constructor name // CHECK: load-classes.cpp:4:9: ParmDecl=value:4:9 (Definition) Extent=[4:5 - 4:14] -// CHECK: load-classes.cpp:5:3: CXXConstructor=X:5:3 Extent=[5:3 - 5:16] [access=public] +// CHECK: load-classes.cpp:5:3: CXXConstructor=X:5:3 (copy constructor) (converting constructor) Extent=[5:3 - 5:16] [access=public] // FIXME: missing TypeRef in the constructor name // CHECK: load-classes.cpp:5:14: ParmDecl=x:5:14 (Definition) Extent=[5:5 - 5:15] // CHECK: load-classes.cpp:5:11: TypeRef=struct X:3:8 Extent=[5:11 - 5:12] @@ -46,7 +46,7 @@ X::X(int value) { // CHECK: load-classes.cpp:16:21: TemplateTypeParameter=T:16:21 (Definition) Extent=[16:12 - 16:22] [access=public] // CHECK: load-classes.cpp:19:16: CXXMethod=virtualMemberFunction:19:16 (virtual) Extent=[19:3 - 19:39] [access=private] // CHECK: load-classes.cpp:20:16: CXXMethod=pureVirtualMemberFunction:20:16 (virtual) (pure) Extent=[20:3 - 20:47] [access=private] -// CHECK: load-classes.cpp:23:4: CXXConstructor=X:23:4 (Definition) Extent=[23:1 - 24:2] [access=public] +// CHECK: load-classes.cpp:23:4: CXXConstructor=X:23:4 (Definition) (converting constructor) Extent=[23:1 - 24:2] [access=public] // CHECK: load-classes.cpp:23:1: TypeRef=struct X:3:8 Extent=[23:1 - 23:2] // CHECK: load-classes.cpp:23:10: ParmDecl=value:23:10 (Definition) Extent=[23:6 - 23:15] // CHECK: load-classes.cpp:23:17: CompoundStmt= Extent=[23:17 - 24:2] diff --git a/test/Index/pch-warn-as-error-code-split.cpp b/test/Index/pch-warn-as-error-code-split.cpp new file mode 100644 index 000000000000..f9efc8f95db4 --- /dev/null +++ b/test/Index/pch-warn-as-error-code-split.cpp @@ -0,0 +1,17 @@ +// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source local %s -Wuninitialized -Werror=unused 2>&1 | FileCheck -check-prefix=DIAGS %s + +// Make sure -Wuninitialized works even though the header had a warn-as-error occurrence. + +// DIAGS: error: unused variable 'x' +// DIAGS: warning: variable 'x1' is uninitialized +// DIAGS-NOT: error: use of undeclared identifier +// DIAGS: warning: variable 'x1' is uninitialized + +#include "pch-warn-as-error-code-split.h" + +void test() { + int x1; // expected-note {{initialize}} + int x2 = x1; // expected-warning {{uninitialized}} + (void)x2; + foo_head(); +} diff --git a/test/Index/pch-warn-as-error-code-split.h b/test/Index/pch-warn-as-error-code-split.h new file mode 100644 index 000000000000..5893ee2a3f76 --- /dev/null +++ b/test/Index/pch-warn-as-error-code-split.h @@ -0,0 +1,4 @@ + +static void foo_head() { + int x; +} diff --git a/test/Index/pch-warn-as-error-code.cpp b/test/Index/pch-warn-as-error-code.cpp new file mode 100644 index 000000000000..6a7924a09e63 --- /dev/null +++ b/test/Index/pch-warn-as-error-code.cpp @@ -0,0 +1,27 @@ +// RUN: rm -f %t.head.h.pch +// RUN: c-index-test -write-pch %t.head.h.pch %s -Wuninitialized -Werror=unused 2>&1 | FileCheck -check-prefix=HEAD_DIAGS %s +// RUN: c-index-test -test-load-source local %s -include %t.head.h -Wuninitialized -Werror=unused 2>&1 | FileCheck -check-prefix=MAIN_DIAGS %s + +// Make sure -Wuninitialized works even though the header had a warn-as-error occurrence. + +// HEAD_DIAGS: error: unused variable 'x' +// MAIN_DIAGS: warning: variable 'x1' is uninitialized +// MAIN_DIAGS-NOT: error: use of undeclared identifier + +#ifndef HEADER +#define HEADER + +static void foo_head() { + int x; +} + +#else + +void test() { + int x1; // expected-note {{initialize}} + int x2 = x1; // expected-warning {{uninitialized}} + (void)x2; + foo_head(); +} + +#endif diff --git a/test/Index/preamble-with-implicit-import.m b/test/Index/preamble-with-implicit-import.m new file mode 100644 index 000000000000..e3d0e8b1a62b --- /dev/null +++ b/test/Index/preamble-with-implicit-import.m @@ -0,0 +1,6 @@ +// RUN: rm -rf %t +// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 2 none %s -I %S/Inputs -fmodules -fmodules-cache-path=%t -fspell-checking 2>&1 | FileCheck %s +// CHECK: error: declaration of 'Typo' must be imported +// CHECK: error: declaration of 'Typo' must be imported + +#include "preamble-with-implicit-import.h" diff --git a/test/Index/print-cxx-manglings.cpp b/test/Index/print-cxx-manglings.cpp index aae299301727..27d7988eb79a 100644 --- a/test/Index/print-cxx-manglings.cpp +++ b/test/Index/print-cxx-manglings.cpp @@ -64,3 +64,33 @@ struct v { // MSVC: CXXConstructor=v{{.*}}[mangled=??0v@@QAE@H@Z] [mangled=??_Fv@@QAEXXZ] +struct w { + virtual int m(int); +}; + +// ITANIUM: CXXMethod=m{{.*}} (virtual) [mangled=_ZN1w1mEi] + +// MACHO: CXXMethod=m{{.*}} (virtual) [mangled=__ZN1w1mEi] + +// MSVC: CXXMethod=m{{.*}} (virtual) [mangled=?m@w@@UAEHH@Z] + +struct x { + virtual int m(int); +}; + +// ITANIUM: CXXMethod=m{{.*}} (virtual) [mangled=_ZN1x1mEi] + +// MACHO: CXXMethod=m{{.*}} (virtual) [mangled=__ZN1x1mEi] + +// MSVC: CXXMethod=m{{.*}} (virtual) [mangled=?m@x@@UAEHH@Z] + +struct y : w, x { + virtual int m(int); +}; + +// ITANIUM: CXXMethod=m{{.*}} (virtual) {{.*}} [mangled=_ZN1y1mEi] [mangled=_ZThn4_N1y1mEi] + +// MACHO: CXXMethod=m{{.*}} (virtual) {{.*}} [mangled=__ZN1y1mEi] [mangled=__ZThn4_N1y1mEi] + +// MSVC: CXXMethod=m{{.*}} (virtual) {{.*}} [mangled=?m@y@@UAEHH@Z] [mangled=?m@y@@W3AEHH@Z] + diff --git a/test/Index/print-type.c b/test/Index/print-type.c index 35aab711db3d..ebe42970eeb3 100644 --- a/test/Index/print-type.c +++ b/test/Index/print-type.c @@ -12,6 +12,9 @@ typedef int __attribute__((vector_size(16))) int4_t; int f2(int incompletearray[]); +enum Enum{i}; enum Enum elaboratedEnumType(); +struct Struct{}; struct Struct elaboratedStructType(); + // RUN: c-index-test -test-print-type %s | FileCheck %s // CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef] [int [5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0] // CHECK: ParmDecl=p:3:13 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] @@ -45,3 +48,8 @@ int f2(int incompletearray[]); // CHECK: VarDecl=x:10:38 [type=__attribute__((__vector_size__(4 * sizeof(int)))) int] [typekind=Vector] [isPOD=1] // CHECK: TypedefDecl=int4_t:11:46 (Definition) [type=int4_t] [typekind=Typedef] [canonicaltype=__attribute__((__vector_size__(4 * sizeof(int)))) int] [canonicaltypekind=Vector] [isPOD=1] // CHECK: ParmDecl=incompletearray:13:12 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1] +// CHECK: FunctionDecl=elaboratedEnumType:15:25 [type=enum Enum ()] [typekind=FunctionNoProto] [canonicaltype=enum Enum ()] [canonicaltypekind=FunctionNoProto] [resulttype=enum Enum] [resulttypekind=Elaborated] [isPOD=0] +// CHECK: TypeRef=enum Enum:15:6 [type=enum Enum] [typekind=Enum] [isPOD=1] +// CHECK: StructDecl=Struct:16:8 (Definition) [type=struct Struct] [typekind=Record] [isPOD=1] +// CHECK: FunctionDecl=elaboratedStructType:16:32 [type=struct Struct ()] [typekind=FunctionNoProto] [canonicaltype=struct Struct ()] [canonicaltypekind=FunctionNoProto] [resulttype=struct Struct] [resulttypekind=Elaborated] [isPOD=0] +// CHECK: TypeRef=struct Struct:16:8 [type=struct Struct] [typekind=Record] [isPOD=1] diff --git a/test/Index/print-type.cpp b/test/Index/print-type.cpp index 61135e3e8ace..44fc11c365a4 100644 --- a/test/Index/print-type.cpp +++ b/test/Index/print-type.cpp @@ -48,7 +48,7 @@ struct Blob { }; int Blob::*member_pointer; - +namespace NS { struct Type{}; } NS::Type elaboratedNamespaceType(const NS::Type t); auto autoI = 0; auto autoTbar = tbar<int>(0); @@ -68,8 +68,8 @@ decltype(auto) autoInt = 5; // CHECK: TemplateTemplateParameter=W:8:60 (Definition) [type=] [typekind=Invalid] [isPOD=0] // CHECK: Namespace=inner:14:11 (Definition) [type=] [typekind=Invalid] [isPOD=0] // CHECK: StructDecl=Bar:16:8 (Definition) [type=outer::inner::Bar] [typekind=Record] [isPOD=0] [nbFields=3] -// CHECK: CXXConstructor=Bar:17:3 (Definition) [type=void (outer::Foo<bool> *){{.*}}] [typekind=FunctionProto] [canonicaltype=void (outer::Foo<bool> *){{.*}}] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [outer::Foo<bool> *] [Pointer]] [isPOD=0] -// CHECK: ParmDecl=foo:17:25 (Definition) [type=outer::Foo<bool> *] [typekind=Pointer] [canonicaltype=outer::Foo<bool> *] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=outer::Foo<bool>] [pointeekind=Unexposed] +// CHECK: CXXConstructor=Bar:17:3 (Definition) (converting constructor) [type=void (outer::Foo<bool> *){{.*}}] [typekind=FunctionProto] [canonicaltype=void (outer::Foo<bool> *){{.*}}] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [outer::Foo<bool> *] [Pointer]] [isPOD=0] +// CHECK: ParmDecl=foo:17:25 (Definition) [type=outer::Foo<bool> *] [typekind=Pointer] [canonicaltype=outer::Foo<bool> *] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=outer::Foo<bool>] [pointeekind=Elaborated] // CHECK: NamespaceRef=outer:1:11 [type=] [typekind=Invalid] [isPOD=0] // CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0] // CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0] @@ -127,6 +127,10 @@ decltype(auto) autoInt = 5; // CHECK: StructDecl=Blob:45:8 (Definition) [type=Blob] [typekind=Record] [isPOD=1] [nbFields=2] // CHECK: FieldDecl=i:46:7 (Definition) [type=int] [typekind=Int] [isPOD=1] // CHECK: VarDecl=member_pointer:49:12 (Definition) [type=int Blob::*] [typekind=MemberPointer] [isPOD=1] +// CHECK: FunctionDecl=elaboratedNamespaceType:51:42 [type=NS::Type (const NS::Type)] [typekind=FunctionProto] [canonicaltype=NS::Type (NS::Type)] [canonicaltypekind=FunctionProto] [resulttype=NS::Type] [resulttypekind=Elaborated] [args= [const NS::Type] [Elaborated]] [isPOD=0] +// CHECK: NamespaceRef=NS:51:11 [type=] [typekind=Invalid] [isPOD=0] +// CHECK: TypeRef=struct NS::Type:51:23 [type=NS::Type] [typekind=Record] [isPOD=1] +// CHECK: ParmDecl=t:51:81 (Definition) [type=const NS::Type] [typekind=Elaborated] const [canonicaltype=const NS::Type] [canonicaltypekind=Record] [isPOD=1] // CHECK: VarDecl=autoI:53:6 (Definition) [type=int] [typekind=Auto] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: VarDecl=autoTbar:54:6 (Definition) [type=int] [typekind=Auto] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] diff --git a/test/Index/print-type.m b/test/Index/print-type.m index 777069b3a58b..392399a573f1 100644 --- a/test/Index/print-type.m +++ b/test/Index/print-type.m @@ -4,6 +4,7 @@ -(const id) mymethod2:(id)x blah:(Class)y boo:(SEL)z; -(bycopy)methodIn:(in int)i andOut:(out short *)j , ...; -(void)kindof_meth:(__kindof Foo *)p; +@property (class) int classProp; @end // RUN: c-index-test -test-print-type %s | FileCheck %s @@ -15,3 +16,4 @@ // CHECK: ParmDecl=i:5:27 (Definition) [In,] [type=int] [typekind=Int] [isPOD=1] // CHECK: ParmDecl=j:5:49 (Definition) [Out,] [type=short *] [typekind=Pointer] [isPOD=1] [pointeetype=short] [pointeekind=Short] // CHECK: ParmDecl=p:6:36 (Definition) [type=__kindof Foo *] [typekind=ObjCObjectPointer] [canonicaltype=__kindof Foo *] [canonicaltypekind=ObjCObjectPointer] [isPOD=1] [pointeetype=Foo] [pointeekind=ObjCInterface] +// CHECK: ObjCPropertyDecl=classProp:7:23 [class,] [type=int] [typekind=Int] [isPOD=1] diff --git a/test/Index/properties-class-extensions.m b/test/Index/properties-class-extensions.m index 0fa0ecba6b63..7af6553fbd9d 100644 --- a/test/Index/properties-class-extensions.m +++ b/test/Index/properties-class-extensions.m @@ -70,7 +70,7 @@ // CHECK-NOT: properties-class-extensions.m:16:25: ObjCInstanceMethodDecl=bar:16:25 Extent=[16:25 - 16:28] // CHECK: properties-class-extensions.m:19:26: ObjCInstanceMethodDecl=setBar::19:26 Extent=[19:26 - 19:29] // CHECK: properties-class-extensions.m:19:26: ParmDecl=bar:19:26 (Definition) Extent=[19:26 - 19:29] -// CHECK: properties-class-extensions.m:24:8: ObjCInterfaceDecl=Rdar8467189_Bar:24:8 Extent=[24:1 - 24:23] +// CHECK-NOT: properties-class-extensions.m:24:8: ObjCInterfaceDecl=Rdar8467189_Bar:24:8 // CHECK: properties-class-extensions.m:24:8: ObjCClassRef=Rdar8467189_Bar:24:8 Extent=[24:8 - 24:23] // CHECK: properties-class-extensions.m:25:11: ObjCProtocolDecl=Rdar8467189_FooProtocol:25:11 (Definition) Extent=[25:1 - 27:5] // CHECK: properties-class-extensions.m:26:39: ObjCPropertyDecl=Rdar8467189_Bar:26:39 [readonly,] Extent=[26:1 - 26:54] diff --git a/test/Index/recursive-cxx-member-calls.cpp b/test/Index/recursive-cxx-member-calls.cpp index 34a56529548f..36d617f48b09 100644 --- a/test/Index/recursive-cxx-member-calls.cpp +++ b/test/Index/recursive-cxx-member-calls.cpp @@ -1653,7 +1653,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) { // CHECK: 45:58: DeclRefExpr=a:45:28 Extent=[45:58 - 45:59] // CHECK: 45:62: DeclRefExpr=b:45:38 Extent=[45:62 - 45:63] // CHECK: 46:1: CXXAccessSpecifier=:46:1 (Definition) Extent=[46:1 - 46:8] -// CHECK: 47:3: CXXConstructor=StringRef:47:3 (Definition) Extent=[47:3 - 47:37] +// CHECK: 47:3: CXXConstructor=StringRef:47:3 (Definition) (default constructor) Extent=[47:3 - 47:37] // CHECK: 47:16: MemberRef=Data:43:15 Extent=[47:16 - 47:20] // CHECK: 47:21: UnexposedExpr= Extent=[47:21 - 47:22] // CHECK: 47:21: IntegerLiteral= Extent=[47:21 - 47:22] @@ -1661,7 +1661,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) { // CHECK: 47:32: UnexposedExpr= Extent=[47:32 - 47:33] // CHECK: 47:32: IntegerLiteral= Extent=[47:32 - 47:33] // CHECK: 47:35: CompoundStmt= Extent=[47:35 - 47:37] -// CHECK: 48:3: CXXConstructor=StringRef:48:3 (Definition) Extent=[48:3 - 48:71] +// CHECK: 48:3: CXXConstructor=StringRef:48:3 (Definition) (converting constructor) Extent=[48:3 - 48:71] // CHECK: 48:25: ParmDecl=Str:48:25 (Definition) Extent=[48:13 - 48:28] // CHECK: 48:32: MemberRef=Data:43:15 Extent=[48:32 - 48:36] // CHECK: 48:37: DeclRefExpr=Str:48:25 Extent=[48:37 - 48:40] @@ -1768,7 +1768,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) { // CHECK: 65:11: Namespace=clang:65:11 (Definition) Extent=[65:1 - 81:2] // CHECK: 66:7: ClassDecl=IdentifierInfo:66:7 (Definition) Extent=[66:1 - 80:2] // CHECK: 67:1: CXXAccessSpecifier=:67:1 (Definition) Extent=[67:1 - 67:8] -// CHECK: 67:8: CXXConstructor=IdentifierInfo:67:8 Extent=[67:8 - 67:24] +// CHECK: 67:8: CXXConstructor=IdentifierInfo:67:8 (default constructor) Extent=[67:8 - 67:24] // CHECK: 68:15: CXXMethod=getNameStart:68:15 (Definition) (const) Extent=[68:3 - 71:4] [access=public] // CHECK: 68:36: CompoundStmt= Extent=[68:36 - 71:4] // CHECK: 69:5: DeclStmt= Extent=[69:5 - 69:65] diff --git a/test/Index/remap-load.c b/test/Index/remap-load.c index f433fa7eac75..f886cea7da75 100644 --- a/test/Index/remap-load.c +++ b/test/Index/remap-load.c @@ -1,4 +1,4 @@ -// RUN: c-index-test -test-load-source all -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s +// RUN: c-index-test -test-load-source all -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck %s // CHECK: remap-load.c:1:5: FunctionDecl=foo:1:5 (Definition) Extent=[1:1 - 3:2] // CHECK: remap-load.c:1:13: ParmDecl=parm1:1:13 (Definition) Extent=[1:9 - 1:18] diff --git a/test/Index/retain-comments-from-system-headers.c b/test/Index/retain-comments-from-system-headers.c index 490699dbd884..ac4f4fa8e3cd 100644 --- a/test/Index/retain-comments-from-system-headers.c +++ b/test/Index/retain-comments-from-system-headers.c @@ -13,7 +13,7 @@ int user_function(int a); // RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs | FileCheck %s -check-prefix=CHECK-RETAIN // Modules: -// RUN: c-index-test -test-load-source all %s -I %S/Inputs -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/retain-comments-from-system-headers-module.map | FileCheck %s -check-prefix=CHECK +// RUN: c-index-test -test-load-source all %s -I %S/Inputs -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/retain-comments-from-system-headers-module.map | FileCheck %s // RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/retain-comments-from-system-headers-module.map | FileCheck %s -check-prefix=CHECK-RETAIN // CHECK: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 Extent=[7:1 - 7:27] diff --git a/test/Index/skip-parsed-bodies/compile_commands.json b/test/Index/skip-parsed-bodies/compile_commands.json index 30ede0db1015..62303cbc87db 100644 --- a/test/Index/skip-parsed-bodies/compile_commands.json +++ b/test/Index/skip-parsed-bodies/compile_commands.json @@ -1,22 +1,21 @@ [ { "directory": ".", - "command": "/usr/bin/clang++ -fsyntax-only t1.cpp", + "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t1.cpp", "file": "t1.cpp" }, { "directory": ".", - "command": "/usr/bin/clang++ -fsyntax-only t2.cpp -DBLAH", + "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t2.cpp -DBLAH", "file": "t2.cpp" }, { "directory": ".", - "command": "/usr/bin/clang++ -fsyntax-only t3.cpp -DBLAH", + "command": "/usr/bin/clang++ -fsyntax-only -fno-ms-compatibility -fno-delayed-template-parsing t3.cpp -DBLAH", "file": "t2.cpp" } ] -// XFAIL: mingw32,win32,windows-gnu // RUN: c-index-test -index-compile-db %s | FileCheck %s // CHECK: [startedTranslationUnit] diff --git a/test/Index/usrs.m b/test/Index/usrs.m index fc3fbc910578..92c3a3fafee2 100644 --- a/test/Index/usrs.m +++ b/test/Index/usrs.m @@ -110,12 +110,12 @@ int test_multi_declaration(void) { // CHECK: usrs.m c:usrs.m@F@my_helper Extent=[3:1 - 3:60] // CHECK: usrs.m c:usrs.m@95@F@my_helper@x Extent=[3:29 - 3:34] // CHECK: usrs.m c:usrs.m@102@F@my_helper@y Extent=[3:36 - 3:41] -// CHECK: usrs.m c:usrs.m@Ea Extent=[5:1 - 8:2] -// CHECK: usrs.m c:usrs.m@Ea@ABA Extent=[6:3 - 6:6] -// CHECK: usrs.m c:usrs.m@Ea@CADABA Extent=[7:3 - 7:9] -// CHECK: usrs.m c:usrs.m@Ea Extent=[10:1 - 13:2] -// CHECK: usrs.m c:usrs.m@Ea@FOO Extent=[11:3 - 11:6] -// CHECK: usrs.m c:usrs.m@Ea@BAR Extent=[12:3 - 12:6] +// CHECK: usrs.m c:@Ea@ABA Extent=[5:1 - 8:2] +// CHECK: usrs.m c:@Ea@ABA@ABA Extent=[6:3 - 6:6] +// CHECK: usrs.m c:@Ea@ABA@CADABA Extent=[7:3 - 7:9] +// CHECK: usrs.m c:@Ea@FOO Extent=[10:1 - 13:2] +// CHECK: usrs.m c:@Ea@FOO@FOO Extent=[11:3 - 11:6] +// CHECK: usrs.m c:@Ea@FOO@BAR Extent=[12:3 - 12:6] // CHECK: usrs.m c:@SA@MyStruct Extent=[15:9 - 18:2] // CHECK: usrs.m c:@SA@MyStruct@FI@wa Extent=[16:3 - 16:9] // CHECK: usrs.m c:@SA@MyStruct@FI@moo Extent=[17:3 - 17:10] |