From 657ad077de755f48abb23d9bfa65e851eca45495 Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Tue, 23 Sep 2014 14:47:18 +0200 Subject: [PATCH] Actually print the enclosing DeclContexts. --- interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp index 6f03947..adf195b 100644 --- a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp +++ b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp @@ -125,11 +125,15 @@ namespace cling { skipCurrentDecl(true); m_Visited[getCanonicalOrNamespace(D)] = false; } else { + StreamRAII Stream(*this); + std::string closeBraces = PrintEnclosingDeclContexts(D->getDeclContext()); clang::DeclVisitor::Visit(D); if (m_SkipFlag) { // D was not good, flag it. skipCurrentDecl(true); m_Visited[getCanonicalOrNamespace(D)] = false; + } else { + Out() << closeBraces; } } } -- 1.8.2