Automatically stream to parent if not skipped.
This commit is contained in:
parent
3db7197ea9
commit
52fb16d57f
@ -510,16 +510,18 @@ namespace cling {
|
||||
Out() << ";\n";
|
||||
}
|
||||
m_Indentation -= m_Policy.Indentation;
|
||||
std::string output = subStream.take(true);
|
||||
Out() << output;
|
||||
if (m_SkipFlag) {
|
||||
return;
|
||||
}
|
||||
} else
|
||||
Out() << ' ';
|
||||
|
||||
// D->getBody()->printPretty(Out, 0, SubPolicy, Indentation);
|
||||
|
||||
}
|
||||
std::string output = stream.take(true);
|
||||
Out() << output << ";\n";
|
||||
if (m_SkipFlag) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void ForwardDeclPrinter::VisitFriendDecl(FriendDecl *D) {
|
||||
@ -892,10 +894,6 @@ namespace cling {
|
||||
else {
|
||||
Visit(D->getTemplatedDecl());
|
||||
}
|
||||
if (!m_SkipFlag) {
|
||||
std::string output = Stream.take(true);
|
||||
Out() << output;
|
||||
}
|
||||
}
|
||||
|
||||
void ForwardDeclPrinter::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) {
|
||||
|
@ -259,8 +259,13 @@ namespace cling {
|
||||
m_pr.m_Policy = *pol;
|
||||
}
|
||||
~StreamRAII() {
|
||||
if (!m_HavePopped)
|
||||
if (!m_HavePopped) {
|
||||
m_pr.m_StreamStack.pop();
|
||||
m_Stream.flush();
|
||||
if (!m_pr.m_SkipFlag) {
|
||||
m_pr.Log() << m_Output;
|
||||
}
|
||||
}
|
||||
m_pr.m_Policy = m_oldPol;
|
||||
}
|
||||
std::string take(bool pop = false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user