diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/Environment.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp index 6344bc5a4d6..df2402ba017 100644 --- a/clang/lib/StaticAnalyzer/Core/Environment.cpp +++ b/clang/lib/StaticAnalyzer/Core/Environment.cpp @@ -235,9 +235,6 @@ void Environment::printJson(raw_ostream &Out, const ASTContext &Ctx, bool HasItem = false; unsigned int InnerSpace = Space + 1; - llvm::SmallString<256> TempBuf; - llvm::raw_svector_ostream TempOut(TempBuf); - // Store the last ExprBinding which we will print. BindingsTy::iterator LastI = ExprBindings.end(); for (BindingsTy::iterator I = ExprBindings.begin(); I != ExprBindings.end(); @@ -266,14 +263,7 @@ void Environment::printJson(raw_ostream &Out, const ASTContext &Ctx, << "{ \"lctx_id\": " << LC->getID() << ", \"stmt_id\": " << S->getID(Ctx) << ", \"pretty\": "; - // See whether the current statement is pretty-printable. - S->printPretty(TempOut, /*Helper=*/nullptr, PP); - if (!TempBuf.empty()) { - Out << '\"' << TempBuf.str().trim() << '\"'; - TempBuf.clear(); - } else { - Out << "null"; - } + S->printJson(Out, nullptr, PP, /*AddQuotes=*/true); Out << ", \"value\": \"" << I->second << "\" }"; |