diff options
Diffstat (limited to 'test/Analysis/dump_egraph.cpp')
-rw-r--r-- | test/Analysis/dump_egraph.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Analysis/dump_egraph.cpp b/test/Analysis/dump_egraph.cpp new file mode 100644 index 0000000000000..10e33a7523f54 --- /dev/null +++ b/test/Analysis/dump_egraph.cpp @@ -0,0 +1,22 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s +// RUN: cat %t.dot | FileCheck %s +// REQUIRES: asserts + +struct S { + ~S(); +}; + +struct T { + S s; + T() : s() {} +}; + +void foo() { + // Test that dumping symbols conjured on null statements doesn't crash. + T t; +} + +// CHECK: (LC1,S{{[0-9]*}},construct into local variable) T t;\n : &t +// CHECK: (LC2,I{{[0-9]*}},construct into member variable) s : &t-\>s +// CHECK: conj_$5\{int, LC3, no stmt, #1\} + |