diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/Environment.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp index eccaee292c4..5f1a37c8d6c 100644 --- a/clang/lib/StaticAnalyzer/Core/Environment.cpp +++ b/clang/lib/StaticAnalyzer/Core/Environment.cpp @@ -202,7 +202,9 @@ EnvironmentManager::removeDeadBindings(Environment Env, } void Environment::print(raw_ostream &Out, const char *NL, - const char *Sep, const LocationContext *WithLC) const { + const char *Sep, + const ASTContext &Context, + const LocationContext *WithLC) const { if (ExprBindings.isEmpty()) return; @@ -222,8 +224,7 @@ void Environment::print(raw_ostream &Out, const char *NL, assert(WithLC); - LangOptions LO; // FIXME. - PrintingPolicy PP(LO); + PrintingPolicy PP = Context.getPrintingPolicy(); Out << NL << NL << "Expressions by stack frame:" << NL; WithLC->dumpStack(Out, "", NL, Sep, [&](const LocationContext *LC) { @@ -234,8 +235,9 @@ void Environment::print(raw_ostream &Out, const char *NL, const Stmt *S = I.first.getStmt(); assert(S != nullptr && "Expected non-null Stmt"); - Out << "(" << (const void *)LC << ',' << (const void *)S << ") "; - S->printPretty(Out, nullptr, PP); + Out << "(LC" << (const void *)LC << ", S" << S->getID(Context) << " <" + << (const void *)S << "> ) "; + S->printPretty(Out, /*Helper=*/nullptr, PP); Out << " : " << I.second << NL; } }); |