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
|
|
|
|
[analyzer] print() JSONify: getNodeLabel implementation
Summary: This patch also rewrites the ProgramPoint printing.
Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus
Reviewed By: NoQ
Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho,
donat.nagy, dkrupp
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62346
llvm-svn: 361997
2019-05-30 02:05:53 +08:00
|
|
|
// CHECK: \"store\": [\l \{ \"cluster\": \"t\", \"items\": [\l \{ \"kind\": \"Default\", \"offset\": 0, \"value\": \"conj_$3\{int, LC3, no stmt, #1\}\"
|
2018-12-04 06:23:21 +08:00
|
|
|
|