diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-31 14:41:23 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-31 14:41:23 +0000 |
commit | 12bca22e91415038c3f05a167297d5b344d45824 (patch) | |
tree | 0bd43a558e801218b75731e00963fbd0222dc7e7 /clang/test/Index/load-classes.cpp | |
parent | db2be6a59285e6049c18be26129cccae28447341 (diff) | |
download | bcm5719-llvm-12bca22e91415038c3f05a167297d5b344d45824.tar.gz bcm5719-llvm-12bca22e91415038c3f05a167297d5b344d45824.zip |
libclang indexing support for C++ constructors, destructors, and
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.
llvm-svn: 112600
Diffstat (limited to 'clang/test/Index/load-classes.cpp')
-rw-r--r-- | clang/test/Index/load-classes.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Index/load-classes.cpp b/clang/test/Index/load-classes.cpp new file mode 100644 index 00000000000..478bf61a44f --- /dev/null +++ b/clang/test/Index/load-classes.cpp @@ -0,0 +1,22 @@ +// Test is line- and column-sensitive; see below. + +struct X { + X(int value); + X(const X& x); + ~X(); + operator X*(); +}; + +// 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 - 8:2] +// CHECK: load-classes.cpp:4:3: CXXConstructor=X:4:3 Extent=[4:3 - 4:15] +// 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] +// FIXME: missing TypeRef in the constructor name +// CHECK: load-classes.cpp:5:14: ParmDecl=x:5:14 (Definition) Extent=[5:11 - 5:15] +// CHECK: load-classes.cpp:5:11: TypeRef=struct X:3:8 Extent=[5:11 - 5:12] +// CHECK: load-classes.cpp:6:3: CXXDestructor=~X:6:3 Extent=[6:3 - 6:7] +// FIXME: missing TypeRef in the destructor name +// CHECK: load-classes.cpp:7:3: CXXConversion=operator struct X *:7:3 Extent=[7:3 - 7:16] +// CHECK: load-classes.cpp:7:12: TypeRef=struct X:3:8 Extent=[7:12 - 7:13] |