summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/svalbuilder-simplify-no-crash.c
blob: b43ccbdbfd1002d7a27373497f632558f744f89b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_analyze_cc1 %s \
// RUN:   -analyzer-checker=core \
// RUN:   -analyzer-checker=debug.ExprInspection \
// RUN:   -verify

// Here, we test that svalbuilder simplification does not produce any
// assertion failure.

void crashing(long a, _Bool b) {
  (void)(a & 1 && 0);
  b = a & 1;
  (void)(b << 1); // expected-warning{{core.UndefinedBinaryOperatorResult}}
}