[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / Analysis / svalbuilder-simplify-intsym.cpp
blob8a58b797c86e5ef42fb760633f408bba93c05949
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 // IntSym expressions based on a newly added constraint on the sub-expression.
10 void clang_analyzer_eval(bool);
12 void test_SValBuilder_simplifies_IntSym(int x, int y) {
13 // Most IntSym BinOps are transformed to SymInt in SimpleSValBuilder.
14 // Division is one exception.
15 x = 77 / y;
16 if (y != 1)
17 return;
18 clang_analyzer_eval(x == 77); // expected-warning{{TRUE}}
19 (void)(x * y);