xref: /llvm-project/clang/test/Analysis/svalbuilder-simplify-no-crash.c (revision 23b88e812366cd00a3724e182f43edab080b634b)
1 // RUN: %clang_analyze_cc1 %s \
2 // RUN:   -analyzer-checker=core \
3 // RUN:   -analyzer-checker=debug.ExprInspection \
4 // RUN:   -verify
5 
6 // Here, we test that svalbuilder simplification does not produce any
7 // assertion failure.
8 
9 // expected-no-diagnostics
10 
crashing(long a,_Bool b)11 void crashing(long a, _Bool b) {
12   (void)(a & 1 && 0);
13   b = a & 1;
14   (void)(b << 1);
15 }
16