1 // RUN: %clang_analyze_cc1 -x c++ -analyzer-checker=debug.ExprInspection \
2 // RUN: -analyzer-config support-symbolic-integer-casts=false \
5 // RUN: %clang_analyze_cc1 -x c++ -analyzer-checker=debug.ExprInspection \
6 // RUN: -analyzer-config support-symbolic-integer-casts=true \
10 void clang_analyzer_dump(T
);
12 void test_no_redundant_floating_point_cast(int n
) {
15 clang_analyzer_dump(D
); // expected-warning{{(double) ((reg_$0<int n>) / 30)}}
17 // There are two cast operations evaluated above:
18 // 1. (n / 30) is cast to a double during the store of `D`.
19 // 2. Then in the next line, in RegionStore::getBinding during the load of `D`.
21 // We should not see in the dump of the SVal any redundant casts like
22 // (double) ((double) $n / 30)