Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / exploration_order / noexprcrash.c
blob75c2f0e6798a3f2f8d771d6b46acbd6ebb737cc4
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify -analyzer-config exploration_strategy=unexplored_first %s
2 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify -analyzer-config exploration_strategy=dfs %s
4 extern void clang_analyzer_eval(int);
6 typedef struct { char a; } b;
7 int c(b* input) {
8 int x = (input->a ?: input) ? 1 : 0; // expected-warning{{pointer/integer type mismatch}}
9 if (input->a) {
10 // FIXME: The value should actually be "TRUE",
11 // but is incorrect due to a bug.
12 clang_analyzer_eval(x); // expected-warning{{FALSE}}
13 } else {
14 clang_analyzer_eval(x); // expected-warning{{TRUE}}
16 return x;