2018-10-23 04:11:10 +08:00
|
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s
|
|
|
|
// RUN: cat %t.dot | FileCheck %s
|
|
|
|
// REQUIRES: asserts
|
|
|
|
|
|
|
|
struct S {
|
|
|
|
~S();
|
|
|
|
};
|
|
|
|
|
2018-12-04 06:23:21 +08:00
|
|
|
struct T {
|
|
|
|
S s;
|
|
|
|
T() : s() {}
|
|
|
|
};
|
|
|
|
|
2018-10-23 04:11:10 +08:00
|
|
|
void foo() {
|
|
|
|
// Test that dumping symbols conjured on null statements doesn't crash.
|
2018-12-04 06:23:21 +08:00
|
|
|
T t;
|
2018-10-23 04:11:10 +08:00
|
|
|
}
|
|
|
|
|
2019-05-30 02:58:41 +08:00
|
|
|
// CHECK: \"constructing_objects\": [\l \{ \"location_context\": \"#0 Call\", \"calling\": \"foo\", \"call_line\": null, \"items\": [\l \{ \"lctx_id\": 1, \"stmt_id\": {{[0-9]+}}, \"kind\": \"construct into local variable\", \"argument_index\": null, \"pretty\": \"T t;\", \"value\": \"&t\"
|
2019-05-29 23:58:26 +08:00
|
|
|
|
2019-05-30 02:58:41 +08:00
|
|
|
// CHECK: \"constructing_objects\": [\l \{ \"location_context\": \"#0 Call\", \"calling\": \"T::T\", \"call_line\": \"16\", \"items\": [\l \{ \"lctx_id\": 2, \"init_id\": {{[0-9]+}}, \"kind\": \"construct into member variable\", \"argument_index\": null, \"pretty\": \"s\", \"value\": \"&t-\>s\"
|
2019-05-29 23:58:26 +08:00
|
|
|
|
2019-05-30 22:48:43 +08:00
|
|
|
// CHECK: \"cluster\": \"t\", \"items\": [\l \{ \"kind\": \"Default\", \"offset\": 0, \"value\": \"conj_$3\{int, LC3, no stmt, #1\}\"
|
2018-12-04 06:23:21 +08:00
|
|
|
|