[ELF] Avoid make in elf::writeARMCmseImportLib
[llvm-project.git] / clang / test / Analysis / svalbuilder-simplify-in-evalbinop.cpp
blobf9a0ee296caf4d55cad1ddd66defa9251499de50
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 // Here we test whether the SValBuilder is capable to simplify existing
8 // SVals based on a newly added constraints when evaluating a BinOp.
10 void clang_analyzer_eval(bool);
12 void test_evalBinOp_simplifies_lhs(int y) {
13 int x = y / 77;
14 if (y != 77)
15 return;
17 // Below `x` is the LHS being simplified.
18 clang_analyzer_eval(x == 1); // expected-warning{{TRUE}}
19 (void)(x * y);
22 void test_evalBinOp_simplifies_rhs(int y) {
23 int x = y / 77;
24 if (y != 77)
25 return;
27 // Below `x` is the RHS being simplified.
28 clang_analyzer_eval(1 == x); // expected-warning{{TRUE}}
29 (void)(x * y);