diff options
author | Csaba Dabis <dabis.csaba98@gmail.com> | 2019-06-24 16:06:44 +0000 |
---|---|---|
committer | Csaba Dabis <dabis.csaba98@gmail.com> | 2019-06-24 16:06:44 +0000 |
commit | 906d494b6e7eb0d8bde19bec2de7d93a9516ebe3 (patch) | |
tree | e32a4ca6c8bc38318b387a6b52b9b2eb871ead11 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | e3a676e9adba668a7da944766218e98dd4b2c10a (diff) | |
download | bcm5719-llvm-906d494b6e7eb0d8bde19bec2de7d93a9516ebe3.tar.gz bcm5719-llvm-906d494b6e7eb0d8bde19bec2de7d93a9516ebe3.zip |
[analyzer] Fix JSON dumps for ExplodedNodes
Summary:
- Now we could see the `has_report` property in `trim-egraph` mode.
- This patch also removes the trailing comma after each node.
Reviewers: NoQ
Reviewed By: NoQ
Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin,
mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63436
llvm-svn: 364193
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 2cef99157c7..38422eb1b1b 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -3009,7 +3009,7 @@ struct DOTGraphTraits<ExplodedGraph*> : public DefaultDOTGraphTraits { for (const auto &EQ : EQClasses) { for (const BugReport &Report : EQ) { - if (Report.getErrorNode() == N) + if (Report.getErrorNode()->getState() == N->getState()) return true; } } @@ -3109,11 +3109,7 @@ struct DOTGraphTraits<ExplodedGraph*> : public DefaultDOTGraphTraits { Indent(Out, Space, IsDot) << "\"program_state\": null"; } - Out << "\\l}"; - if (!N->succ_empty()) - Out << ','; - Out << "\\l"; - + Out << "\\l}\\l"; return Out.str(); } }; |