summaryrefslogtreecommitdiffstats
path: root/tools/c-index-test
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
commit1c8c47123f17c4ae9a4de07ee453782b9dae8757 (patch)
tree3b6f14a12b4246ac9e4382488efea501cbc9b1dd /tools/c-index-test
parent73a2603c075db5587dfb70eee7fb7f0476836aaa (diff)
[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
Diffstat (limited to 'tools/c-index-test')
-rw-r--r--tools/c-index-test/core_main.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/c-index-test/core_main.cpp b/tools/c-index-test/core_main.cpp
index e37b3422ac..e72b9f93ef 100644
--- a/tools/c-index-test/core_main.cpp
+++ b/tools/c-index-test/core_main.cpp
@@ -156,10 +156,7 @@ static void printSymbolInfo(SymbolInfo SymInfo, raw_ostream &OS) {
static void printSymbolNameAndUSR(const Decl *D, ASTContext &Ctx,
raw_ostream &OS) {
- if (auto *ND = dyn_cast<NamedDecl>(D)) {
- PrintingPolicy PrintPolicy(Ctx.getLangOpts());
- ND->getDeclName().print(OS, PrintPolicy);
- } else {
+ if (printSymbolName(D, Ctx.getLangOpts(), OS)) {
OS << "<no-name>";
}
OS << " | ";