summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp8
-rw-r--r--clang/test/Analysis/dump_egraph.c12
2 files changed, 10 insertions, 10 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();
}
};
diff --git a/clang/test/Analysis/dump_egraph.c b/clang/test/Analysis/dump_egraph.c
index f1ac03b10cc..701e9850798 100644
--- a/clang/test/Analysis/dump_egraph.c
+++ b/clang/test/Analysis/dump_egraph.c
@@ -1,6 +1,12 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=core \
+// RUN: -analyzer-dump-egraph=%t.dot %s
// RUN: cat %t.dot | FileCheck %s
-// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot -trim-egraph %s
+
+// RUN: %clang_analyze_cc1 -analyzer-checker=core \
+// RUN: -analyzer-dump-egraph=%t.dot \
+// RUN: -trim-egraph %s
+// RUN: cat %t.dot | FileCheck %s
+
// REQUIRES: asserts
int getJ();
@@ -10,8 +16,6 @@ int foo() {
return *x + *y;
}
-// CHECK: digraph "Exploded Graph" {
-
// CHECK: \"program_points\": [\l&nbsp;&nbsp;&nbsp;&nbsp;\{ \"kind\": \"Edge\", \"src_id\": 2, \"dst_id\": 1, \"terminator\": null, \"term_kind\": null, \"tag\": null \}\l&nbsp;&nbsp;],\l&nbsp;&nbsp;\"program_state\": null
// CHECK: \"program_points\": [\l&nbsp;&nbsp;&nbsp;&nbsp;\{ \"kind\": \"BlockEntrance\", \"block_id\": 1
OpenPOWER on IntegriCloud