summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/dump_egraph.c
blob: f1ac03b10cc94e0ef6d0b6f5aabe4e3b27ad0b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_analyze_cc1 -analyzer-checker=core -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
// REQUIRES: asserts

int getJ();

int foo() {
  int *x = 0, *y = 0;
  return *x + *y;
}

// CHECK: digraph "Exploded Graph" {

// 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

OpenPOWER on IntegriCloud