blob: 58770191ea997b70ed94d06a1ff1f5b21123eefc [file] [log] [blame]
Douglas Gregor01829d32010-08-31 14:41:23 +00001// Test is line- and column-sensitive; see below.
2
3struct X {
4 X(int value);
5 X(const X& x);
6 ~X();
7 operator X*();
8};
9
Douglas Gregorc5ade2e2010-09-02 17:35:32 +000010X::X(int value) {
11}
12
Douglas Gregor01829d32010-08-31 14:41:23 +000013// RUN: c-index-test -test-load-source all %s | FileCheck %s
14// CHECK: load-classes.cpp:3:8: StructDecl=X:3:8 (Definition) Extent=[3:1 - 8:2]
15// CHECK: load-classes.cpp:4:3: CXXConstructor=X:4:3 Extent=[4:3 - 4:15]
16// FIXME: missing TypeRef in the constructor name
17// CHECK: load-classes.cpp:4:9: ParmDecl=value:4:9 (Definition) Extent=[4:5 - 4:14]
18// CHECK: load-classes.cpp:5:3: CXXConstructor=X:5:3 Extent=[5:3 - 5:16]
19// FIXME: missing TypeRef in the constructor name
Abramo Bagnaraff676cb2011-03-08 08:55:46 +000020// CHECK: load-classes.cpp:5:14: ParmDecl=x:5:14 (Definition) Extent=[5:5 - 5:15]
Douglas Gregor01829d32010-08-31 14:41:23 +000021// CHECK: load-classes.cpp:5:11: TypeRef=struct X:3:8 Extent=[5:11 - 5:12]
22// CHECK: load-classes.cpp:6:3: CXXDestructor=~X:6:3 Extent=[6:3 - 6:7]
23// FIXME: missing TypeRef in the destructor name
24// CHECK: load-classes.cpp:7:3: CXXConversion=operator struct X *:7:3 Extent=[7:3 - 7:16]
25// CHECK: load-classes.cpp:7:12: TypeRef=struct X:3:8 Extent=[7:12 - 7:13]
Abramo Bagnaraff676cb2011-03-08 08:55:46 +000026// CHECK: load-classes.cpp:10:4: CXXConstructor=X:10:4 (Definition) Extent=[10:1 - 11:2]
Douglas Gregorc5ade2e2010-09-02 17:35:32 +000027// CHECK: load-classes.cpp:10:1: TypeRef=struct X:3:8 Extent=[10:1 - 10:2]
28// CHECK: load-classes.cpp:10:10: ParmDecl=value:10:10 (Definition) Extent=[10:6 - 10:15]