2019-06-25 00:06:44 +08:00
|
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
|
|
|
|
// RUN: -analyzer-dump-egraph=%t.dot %s
|
2018-09-29 02:49:21 +08:00
|
|
|
// RUN: cat %t.dot | FileCheck %s
|
2019-06-25 00:06:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
|
|
|
|
// RUN: -analyzer-dump-egraph=%t.dot \
|
|
|
|
// RUN: -trim-egraph %s
|
|
|
|
// RUN: cat %t.dot | FileCheck %s
|
|
|
|
|
2018-09-29 02:49:21 +08:00
|
|
|
// REQUIRES: asserts
|
|
|
|
|
|
|
|
int getJ();
|
|
|
|
|
|
|
|
int foo() {
|
2018-10-03 05:19:01 +08:00
|
|
|
int *x = 0, *y = 0;
|
|
|
|
return *x + *y;
|
2018-09-29 02:49:21 +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: \"program_points\": [\l \{ \"kind\": \"Edge\", \"src_id\": 2, \"dst_id\": 1, \"terminator\": null, \"term_kind\": null, \"tag\": null \}\l ],\l \"program_state\": null
|
|
|
|
|
|
|
|
// CHECK: \"program_points\": [\l \{ \"kind\": \"BlockEntrance\", \"block_id\": 1
|
|
|
|
|
|
|
|
// CHECK: \"has_report\": true
|
|
|
|
|