From 1c8c47123f17c4ae9a4de07ee453782b9dae8757 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Mon, 15 Feb 2016 01:32:36 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260866 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Index/Core/index-source.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/Index/Core/index-source.cpp (limited to 'test/Index/Core') diff --git a/test/Index/Core/index-source.cpp b/test/Index/Core/index-source.cpp new file mode 100644 index 0000000000..7544646826 --- /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 +class TemplCls { +// CHECK: [[@LINE-1]]:7 | c++-class/C++ | TemplCls | c:@ST>1#T@TemplCls | | Def | rel: 0 + TemplCls(int x); + // CHECK: [[@LINE-1]]:3 | constructor/C++ | TemplCls | c:@ST>1#T@TemplCls@F@TemplCls#I# | | Decl/RelChild | rel: 1 + // CHECK-NEXT: RelChild | TemplCls | c:@ST>1#T@TemplCls +}; -- cgit v1.2.1