r335932 - [analyzer] fix test case expected warning
Mikhail R. Gadelha via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 28 15:08:45 PDT 2018
Author: mramalho
Date: Thu Jun 28 15:08:44 2018
New Revision: 335932
URL: http://llvm.org/viewvc/llvm-project?rev=335932&view=rev
Log:
[analyzer] fix test case expected warning
After r335814, the constraint manager is no longer generating a false bug report
about the division by zero in the test case.
This patch removes the expected false bug report.
Modified:
cfe/trunk/test/Analysis/z3-crosscheck.c
Modified: cfe/trunk/test/Analysis/z3-crosscheck.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/z3-crosscheck.c?rev=335932&r1=335931&r2=335932&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/z3-crosscheck.c (original)
+++ cfe/trunk/test/Analysis/z3-crosscheck.c Thu Jun 28 15:08:44 2018
@@ -21,22 +21,14 @@ void f(int *a, int *b) {
if ((a - b) == 0)
c = 0;
if (a != b)
-#ifdef NO_CROSSCHECK
- g(3 / c); // expected-warning {{Division by zero}}
-#else
g(3 / c); // no-warning
-#endif
}
_Bool nondet_bool();
void h(int d) {
int x, y, k, z = 1;
-#ifdef NO_CROSSCHECK
while (z < k) { // expected-warning {{The right operand of '<' is a garbage value}}
-#else
- while (z < k) { // expected-warning {{The right operand of '<' is a garbage value}}
-#endif
z = 2 * z;
}
}
More information about the cfe-commits
mailing list