Clang Project

clang_source_code/test/Analysis/dump_egraph.c
1// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s
2// RUN: cat %t.dot | FileCheck %s
3// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot -trim-egraph %s
4// REQUIRES: asserts
5
6int getJ();
7
8int foo() {
9  int *x = 0, *y = 0;
10  return *x + *y;
11}
12
13// CHECK: digraph "Exploded Graph" {
14// CHECK: Edge: (B2, B1)
15// CHECK: Block Entrance: B1
16// CHECK: Bug report attached
17