[cfe-commits] r56548 - /cfe/trunk/test/Analysis/null-deref-ps.c
Ted Kremenek
kremenek at apple.com
Tue Sep 23 23:40:03 PDT 2008
Author: kremenek
Date: Wed Sep 24 01:40:03 2008
New Revision: 56548
URL: http://llvm.org/viewvc/llvm-project?rev=56548&view=rev
Log:
Updated test case.
Modified:
cfe/trunk/test/Analysis/null-deref-ps.c
Modified: cfe/trunk/test/Analysis/null-deref-ps.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/null-deref-ps.c?rev=56548&r1=56547&r2=56548&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/null-deref-ps.c (original)
+++ cfe/trunk/test/Analysis/null-deref-ps.c Wed Sep 24 01:40:03 2008
@@ -1,4 +1,4 @@
-// RUN: clang -checker-simple -verify %s
+// RUN: clang -std=gnu99 -checker-simple -verify %s
#include<stdint.h>
#include <assert.h>
@@ -94,8 +94,9 @@
int f9(unsigned len) {
assert (len != 0);
int *p = 0;
+ unsigned i;
- for (unsigned i = 0; i < len; ++i)
+ for (i = 0; i < len; ++i)
p = qux(i);
return *p++; // no-warning
@@ -104,8 +105,9 @@
int f9b(unsigned len) {
assert (len > 0); // note use of '>'
int *p = 0;
+ unsigned i;
- for (unsigned i = 0; i < len; ++i)
+ for (i = 0; i < len; ++i)
p = qux(i);
return *p++; // no-warning
More information about the cfe-commits
mailing list