[cfe-commits] r112769 - /cfe/trunk/test/Analysis/misc-ps-region-store.m
Ted Kremenek
kremenek at apple.com
Wed Sep 1 16:37:36 PDT 2010
Author: kremenek
Date: Wed Sep 1 18:37:36 2010
New Revision: 112769
URL: http://llvm.org/viewvc/llvm-project?rev=112769&view=rev
Log:
Add another test case for PR 8015, here with the array index being within a valid range and not just a single constant.
Modified:
cfe/trunk/test/Analysis/misc-ps-region-store.m
Modified: cfe/trunk/test/Analysis/misc-ps-region-store.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps-region-store.m?rev=112769&r1=112768&r2=112769&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps-region-store.m (original)
+++ cfe/trunk/test/Analysis/misc-ps-region-store.m Wed Sep 1 18:37:36 2010
@@ -1116,3 +1116,12 @@
}
}
+void pr8015_E() {
+ // Similar to pr8015_C, but number is allowed to be a valid range.
+ int number = pr8015_A();
+ const char *numbers[] = { "zero", "one", "two" };
+ if (number < 3) {
+ pr8015_B(numbers[number]); // no-warning
+ }
+}
+
More information about the cfe-commits
mailing list