summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/Core/index-source.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-02-15 01:32:36 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-02-15 01:32:36 +0000
commitd5719084451ae227c75b2db7078162f921a5a823 (patch)
tree116afc1d5b03c81f8ef41ea2785233b6673b78eb /clang/test/Index/Core/index-source.cpp
parent9b0ac3345716b686ad09b613b627d4f97c87d58f (diff)
downloadbcm5719-llvm-d5719084451ae227c75b2db7078162f921a5a823.tar.gz
bcm5719-llvm-d5719084451ae227c75b2db7078162f921a5a823.zip
[AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in printing policy.
Enable it for USRs and names when indexing. Forward references can have different template argument names; including them makes USRs and names unstable, since the name depends on whether we saw a forward reference or not. llvm-svn: 260866
Diffstat (limited to 'clang/test/Index/Core/index-source.cpp')
-rw-r--r--clang/test/Index/Core/index-source.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp
new file mode 100644
index 00000000000..75446468266
--- /dev/null
+++ b/clang/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 | c++-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
+};
OpenPOWER on IntegriCloud