forked from OSchip/llvm-project
[analyzer] Use correct end-of-line character when printing statements for exploded graph
Prevents bad centering. Differential Revision: https://reviews.llvm.org/D51825 llvm-svn: 342312
This commit is contained in:
parent
64885ae9c0
commit
141b448ee9
|
@ -3071,12 +3071,14 @@ struct DOTGraphTraits<ExplodedNode*> : public DefaultDOTGraphTraits {
|
|||
if (const auto *C = dyn_cast<CaseStmt>(Label)) {
|
||||
Out << "\\lcase ";
|
||||
if (C->getLHS())
|
||||
C->getLHS()->printPretty(Out, nullptr,
|
||||
Context.getPrintingPolicy());
|
||||
C->getLHS()->printPretty(
|
||||
Out, nullptr, Context.getPrintingPolicy(),
|
||||
/*Indentation=*/0, /*NewlineSymbol=*/"\\l");
|
||||
|
||||
if (const Stmt *RHS = C->getRHS()) {
|
||||
Out << " .. ";
|
||||
RHS->printPretty(Out, nullptr, Context.getPrintingPolicy());
|
||||
RHS->printPretty(Out, nullptr, Context.getPrintingPolicy(),
|
||||
/*Indetation=*/0, /*NewlineSymbol=*/"\\l");
|
||||
}
|
||||
|
||||
Out << ":";
|
||||
|
@ -3108,7 +3110,8 @@ struct DOTGraphTraits<ExplodedNode*> : public DefaultDOTGraphTraits {
|
|||
|
||||
Out << S->getStmtClassName() << ' '
|
||||
<< S->getID(Context) << " (" << (const void *)S << ") ";
|
||||
S->printPretty(Out, nullptr, Context.getPrintingPolicy());
|
||||
S->printPretty(Out, /*helper=*/nullptr, Context.getPrintingPolicy(),
|
||||
/*Indentation=*/2, /*NewlineSymbol=*/"\\l");
|
||||
printLocation(Out, S->getBeginLoc());
|
||||
|
||||
if (Loc.getAs<PreStmt>())
|
||||
|
|
Loading…
Reference in New Issue