[cfe-commits] r92120 - /cfe/trunk/test/Analysis/misc-ps-region-store.cpp
Ted Kremenek
kremenek at apple.com
Wed Dec 23 18:41:19 PST 2009
Author: kremenek
Date: Wed Dec 23 20:41:19 2009
New Revision: 92120
URL: http://llvm.org/viewvc/llvm-project?rev=92120&view=rev
Log:
Add analyzer test case for 'ForStmt' with condition variable.
Modified:
cfe/trunk/test/Analysis/misc-ps-region-store.cpp
Modified: cfe/trunk/test/Analysis/misc-ps-region-store.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps-region-store.cpp?rev=92120&r1=92119&r2=92120&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps-region-store.cpp (original)
+++ cfe/trunk/test/Analysis/misc-ps-region-store.cpp Wed Dec 23 20:41:19 2009
@@ -75,3 +75,17 @@
return 0;
}
+
+int test_init_in_condition_for() {
+ int z = 0;
+ for (int x = 0; int y = ++z; ++x) {
+ if (x == y) // no-warning
+ break;
+ }
+ if (z == 1)
+ return 0;
+
+ int *p = 0;
+ *p = 0xDEADBEEF; // no-warning
+ return 0;
+}
More information about the cfe-commits
mailing list