Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / PR37855.c
blobe9c2564ba008a33499f210bb41d2c3e5b84eabf8
1 // RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s
2 // RUN: %clang_cc1 -analyze -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s
3 // REQUIRES: z3
5 typedef struct o p;
6 struct o {
7 struct {
8 } s;
9 };
11 void q(*r, p2) { r < p2; }
13 void k(l, node) {
14 struct {
15 p *node;
16 } * n, *nodep, path[sizeof(void)];
17 path->node = l;
18 for (n = path; node != l;) {
19 q(node, n->node);
20 nodep = n;
22 if (nodep) // expected-warning {{Branch condition evaluates to a garbage value}}
23 n[1].node->s;