Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 1 | // Test is line- and column-sensitive; see below. |
| 2 | |
| 3 | struct X { |
| 4 | X(int value); |
| 5 | X(const X& x); |
Argyrios Kyrtzidis | 04b6748 | 2013-04-11 17:02:10 +0000 | [diff] [blame] | 6 | protected: |
Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 7 | ~X(); |
Argyrios Kyrtzidis | 04b6748 | 2013-04-11 17:02:10 +0000 | [diff] [blame] | 8 | private: |
Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 9 | operator X*(); |
| 10 | }; |
| 11 | |
Douglas Gregor | c5ade2e | 2010-09-02 17:35:32 +0000 | [diff] [blame] | 12 | X::X(int value) { |
| 13 | } |
| 14 | |
Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 15 | // RUN: c-index-test -test-load-source all %s | FileCheck %s |
Argyrios Kyrtzidis | 04b6748 | 2013-04-11 17:02:10 +0000 | [diff] [blame] | 16 | // CHECK: load-classes.cpp:3:8: StructDecl=X:3:8 (Definition) Extent=[3:1 - 10:2] |
| 17 | // CHECK: load-classes.cpp:4:3: CXXConstructor=X:4:3 Extent=[4:3 - 4:15] [access=public] |
Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 18 | // FIXME: missing TypeRef in the constructor name |
| 19 | // CHECK: load-classes.cpp:4:9: ParmDecl=value:4:9 (Definition) Extent=[4:5 - 4:14] |
Argyrios Kyrtzidis | 04b6748 | 2013-04-11 17:02:10 +0000 | [diff] [blame] | 20 | // CHECK: load-classes.cpp:5:3: CXXConstructor=X:5:3 Extent=[5:3 - 5:16] [access=public] |
Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 21 | // FIXME: missing TypeRef in the constructor name |
Abramo Bagnara | ff676cb | 2011-03-08 08:55:46 +0000 | [diff] [blame] | 22 | // CHECK: load-classes.cpp:5:14: ParmDecl=x:5:14 (Definition) Extent=[5:5 - 5:15] |
Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 23 | // CHECK: load-classes.cpp:5:11: TypeRef=struct X:3:8 Extent=[5:11 - 5:12] |
Argyrios Kyrtzidis | 04b6748 | 2013-04-11 17:02:10 +0000 | [diff] [blame] | 24 | // CHECK: load-classes.cpp:7:3: CXXDestructor=~X:7:3 Extent=[7:3 - 7:7] [access=protected] |
Douglas Gregor | 01829d3 | 2010-08-31 14:41:23 +0000 | [diff] [blame] | 25 | // FIXME: missing TypeRef in the destructor name |
Argyrios Kyrtzidis | 04b6748 | 2013-04-11 17:02:10 +0000 | [diff] [blame] | 26 | // CHECK: load-classes.cpp:9:3: CXXConversion=operator struct X *:9:3 Extent=[9:3 - 9:16] [access=private] |
| 27 | // CHECK: load-classes.cpp:9:12: TypeRef=struct X:3:8 Extent=[9:12 - 9:13] |
| 28 | // CHECK: load-classes.cpp:12:4: CXXConstructor=X:12:4 (Definition) Extent=[12:1 - 13:2] [access=public] |
| 29 | // CHECK: load-classes.cpp:12:1: TypeRef=struct X:3:8 Extent=[12:1 - 12:2] |
| 30 | // CHECK: load-classes.cpp:12:10: ParmDecl=value:12:10 (Definition) Extent=[12:6 - 12:15] |