summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/Environment.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-06-19 23:33:48 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-06-19 23:33:48 +0000
commitf9f6cdb1a8d05585256f6f2285aa684e557e5676 (patch)
tree280c24cf5efd46d1367f614dfe0c278ed51a55fe /clang/lib/StaticAnalyzer/Core/Environment.cpp
parent3bb7b2ec7f7bcb913dc4a44fdbe14af508acefb7 (diff)
downloadbcm5719-llvm-f9f6cdb1a8d05585256f6f2285aa684e557e5676.tar.gz
bcm5719-llvm-f9f6cdb1a8d05585256f6f2285aa684e557e5676.zip
[analyzer] Fix JSON dumps for location contexts.
Location context ID is a property of the location context, not of an item within it. It's useful to know the id even when there are no items in the context, eg. for the purposes of figuring out how did contents of the Environment for the same location context changed across states. Differential Revision: https://reviews.llvm.org/D62754 llvm-svn: 363895
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/Environment.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp
index 94cc4d6dbb2..0ca3f778f1b 100644
--- a/clang/lib/StaticAnalyzer/Core/Environment.cpp
+++ b/clang/lib/StaticAnalyzer/Core/Environment.cpp
@@ -261,8 +261,7 @@ void Environment::printJson(raw_ostream &Out, const ASTContext &Ctx,
const Stmt *S = I->first.getStmt();
Indent(Out, InnerSpace, IsDot)
- << "{ \"lctx_id\": " << LC->getID()
- << ", \"stmt_id\": " << S->getID(Ctx) << ", \"pretty\": ";
+ << "{ \"stmt_id\": " << S->getID(Ctx) << ", \"pretty\": ";
S->printJson(Out, nullptr, PP, /*AddQuotes=*/true);
Out << ", \"value\": ";
OpenPOWER on IntegriCloud