From e188b339b0263cefd810bf809f185681c9afc8b7 Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Fri, 12 Sep 2014 16:20:14 +0200 Subject: [PATCH] Use fully qualified template args. --- interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp index a3d70a1..c0d016d 100644 --- a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp +++ b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp @@ -2,6 +2,7 @@ #include "cling/Interpreter/DynamicLibraryManager.h" #include "cling/Interpreter/Transaction.h" +#include "cling/Utils/AST.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" @@ -820,14 +821,20 @@ namespace cling { Out() << *TTP; + QualType ArgQT; if (Args) { - Out() << " = "; - Args->get(i).print(m_Policy, Out()); + ArgQT = Args->get(i).getAsType(); } else if (TTP->hasDefaultArgument() && !TTP->defaultArgumentWasInherited()) { + ArgQT = TTP->getDefaultArgument(); + } + if (!ArgQT.isNull()) { + QualType ArgFQQT + = utils::TypeName::GetFullyQualifiedType(ArgQT, + TTP->getASTContext()); Out() << " = "; - Out() << TTP->getDefaultArgument().getAsString(m_Policy); + ArgFQQT.print(Out(), m_Policy); } } else if (const NonTypeTemplateParmDecl *NTTP = -- 1.8.2