[ELF] Avoid make in elf::writeARMCmseImportLib
[llvm-project.git] / clang / test / Analysis / symbol-simplification-reassume.cpp
bloba732170c969af32b8dddbf06e422ace98bb422b5
1 // RUN: %clang_analyze_cc1 %s \
2 // RUN: -analyzer-checker=core \
3 // RUN: -analyzer-checker=debug.ExprInspection \
4 // RUN: -analyzer-config eagerly-assume=false \
5 // RUN: -verify
7 // In this test we check whether the solver's symbol simplification mechanism
8 // is capable of re-assuming simiplified symbols.
10 void clang_analyzer_eval(bool);
11 void clang_analyzer_warnIfReached();
13 void test_reassume_false_range(int x, int y) {
14 if (x + y != 0) // x + y == 0
15 return;
16 if (x != 1) // x == 1
17 return;
18 clang_analyzer_eval(y == -1); // expected-warning{{TRUE}}
21 void test_reassume_true_range(int x, int y) {
22 if (x + y != 1) // x + y == 1
23 return;
24 if (x != 1) // x == 1
25 return;
26 clang_analyzer_eval(y == 0); // expected-warning{{TRUE}}
29 void test_reassume_inclusive_range(int x, int y) {
30 if (x + y < 0 || x + y > 1) // x + y: [0, 1]
31 return;
32 if (x != 1) // x == 1
33 return;
34 // y: [-1, 0]
35 clang_analyzer_eval(y > 0); // expected-warning{{FALSE}}
36 clang_analyzer_eval(y < -1);// expected-warning{{FALSE}}