summaryrefslogtreecommitdiffstats
path: root/test/Analysis/malloc.c
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-03-10 17:45:58 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-03-10 17:45:58 +0000
commit27c39af73c0d7d0b97e57b3a905040d4cefc9708 (patch)
tree56c1dd85a159948815817b5a90bedb39cf9ad105 /test/Analysis/malloc.c
parentd2e6cf1d1c6468396ec057119c32aa58b1ee5ac9 (diff)
downloadFreeBSD-src-27c39af73c0d7d0b97e57b3a905040d4cefc9708.zip
FreeBSD-src-27c39af73c0d7d0b97e57b3a905040d4cefc9708.tar.gz
Update clang to r98164.
Diffstat (limited to 'test/Analysis/malloc.c')
-rw-r--r--test/Analysis/malloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/malloc.c b/test/Analysis/malloc.c
index 3cce1b0..21b6d46 100644
--- a/test/Analysis/malloc.c
+++ b/test/Analysis/malloc.c
@@ -61,3 +61,9 @@ void pr6069() {
void pr6293() {
free(0);
}
+
+void f7() {
+ char *x = (char*) malloc(4);
+ free(x);
+ x[0] = 'a'; // expected-warning{{Use dynamically allocated memory after it is freed.}}
+}
OpenPOWER on IntegriCloud