From: Axel Naumann Date: Fri, 19 Sep 2014 14:54:04 +0000 (+0200) Subject: Do not stream const vars; for static ones, do not print "extern". X-Git-Tag: v6-02-00-rc1~39 X-Git-Url: https://root.cern.ch/gitweb?p=root.git;a=commitdiff_plain;h=72c1d0405b3075ae487a82d21ee15896aa5c1013 Do not stream const vars; for static ones, do not print "extern". --- diff --git a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp index 1ebe663..e2a5701 100644 --- a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp +++ b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp @@ -561,7 +561,8 @@ namespace cling { return; } - if (D->isDefinedOutsideFunctionOrMethod() && D->getStorageClass() != SC_Extern) + if (D->isDefinedOutsideFunctionOrMethod() && D->getStorageClass() != SC_Extern + && D->getStorageClass() != SC_Static) Out() << "extern "; m_Policy.Bool = true; @@ -1132,8 +1133,8 @@ namespace cling { } bool ForwardDeclPrinter::shouldSkipImpl(VarDecl *D) { - if (D->getStorageClass() == SC_Static) { - Log() << D->getName() <<" Var : Static\n"; + if (D->getType().isConstQualified()) { + Log() << D->getName() <<" Var : Const\n"; m_Visited[D->getCanonicalDecl()] = false; return true; }