[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / Analysis / dump_egraph.c
blob06c3ccd1e102afcf7607f236204ee2e8d77ebf16
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core \
2 // RUN: -analyzer-dump-egraph=%t.dot %s
3 // RUN: cat %t.dot | FileCheck %s
5 // RUN: %clang_analyze_cc1 -analyzer-checker=core \
6 // RUN: -analyzer-dump-egraph=%t.dot \
7 // RUN: -trim-egraph %s
8 // RUN: cat %t.dot | FileCheck %s
10 int getJ(void);
12 int foo(void) {
13 int *x = 0, *y = 0;
14 char c = '\x13';
16 return *x + *y;
19 // CHECK: \"program_points\": [\l
20 // CHECK-SAME: \{ \"kind\": \"Edge\", \"src_id\": 2, \"dst_id\": 1,
21 // CHECK-SAME: \"terminator\": null, \"term_kind\": null, \"tag\": null,
22 // CHECK-SAME: \"node_id\": 1, \"is_sink\": 0, \"has_report\": 0
23 // CHECK-SAME: \},
24 // CHECK-SAME: \{ \"kind\": \"BlockEntrance\", \"block_id\": 1, \"tag\": null,
25 // CHECK-SAME: \"node_id\": 2, \"is_sink\": 0, \"has_report\": 0
26 // CHECK-SAME: \},
27 // CHECK-SAME: \{ \"kind\": \"Statement\", \"stmt_kind\": \"IntegerLiteral\",
28 // CHECK-SAME: \"stmt_id\": {{[0-9]*}}, \"pointer\": \"0x{{[0-9a-f]*}}\",
29 // CHECK-SAME: \"pretty\": \"0\", \"location\": \{
30 // CHECK-SAME: \"line\": 13, \"column\": 12, \"file\":
31 // CHECK-SAME: \}, \"stmt_point_kind\": \"PreStmtPurgeDeadSymbols\",
32 // CHECK-SAME: \"tag\": \"ExprEngine : Clean Node\", \"node_id\": 3,
33 // CHECK-SAME: \"is_sink\": 0, \"has_report\": 0
34 // CHECK-SAME: \},
35 // CHECK-SAME: \{ \"kind\": \"Statement\", \"stmt_kind\": \"IntegerLiteral\",
36 // CHECK-SAME: \"stmt_id\": {{[0-9]*}}, \"pointer\": \"0x{{[0-9a-f]*}}\",
37 // CHECK-SAME: \"pretty\": \"0\", \"location\": \{
38 // CHECK-SAME: \"line\": 13, \"column\": 12, \"file\":
39 // CHECK-SAME: \}, \"stmt_point_kind\": \"PostStmt\", \"tag\": null,
40 // CHECK-SAME: \"node_id\": 4, \"is_sink\": 0, \"has_report\": 0
41 // CHECK-SAME: \}
42 // CHECK-SAME: ]
44 // CHECK: \"pretty\": \"*x\", \"location\": \{ \"line\": 16, \"column\": 10, \"file\": \"{{(.+)}}dump_egraph.c\" \}
46 // CHECK: \"pretty\": \"'\\\\x13'\"
48 // CHECK: \"has_report\": 1
50 // CHECK-NOT: \"program_state\": null