summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc.c
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-04-09 00:30:28 +0000
committerAnna Zaks <ganna@apple.com>2013-04-09 00:30:28 +0000
commit93a21a8cfe7f898e22f8f0f2ba4ff97289685640 (patch)
tree5658617dbf08e54069d706da348a4a7bed4485d8 /clang/test/Analysis/malloc.c
parent5d6cec9bff205c6bd4f4475a684bbfa68ded7e3a (diff)
downloadbcm5719-llvm-93a21a8cfe7f898e22f8f0f2ba4ff97289685640.tar.gz
bcm5719-llvm-93a21a8cfe7f898e22f8f0f2ba4ff97289685640.zip
[analyzer] Keep tracking the pointer after the escape to more aggressively report mismatched deallocator
Test that the path notes do not change. I don’t think we should print a note on escape. Also, I’ve removed a check that assumed that the family stored in the RefStete could be AF_None and added an assert in the constructor. llvm-svn: 179075
Diffstat (limited to 'clang/test/Analysis/malloc.c')
-rw-r--r--clang/test/Analysis/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Analysis/malloc.c b/clang/test/Analysis/malloc.c
index fae3a4dddbd..6071d1d4358 100644
--- a/clang/test/Analysis/malloc.c
+++ b/clang/test/Analysis/malloc.c
@@ -1107,7 +1107,7 @@ void testOffsetOfRegionFreedAfterFunctionCall() {
int *p = malloc(sizeof(int)*2);
p += 1;
myfoo(p);
- free(p); // no-warning
+ free(p); // expected-warning{{Argument to free() is offset by 4 bytes from the start of memory allocated by malloc()}}
}
void testFixManipulatedPointerBeforeFree() {
OpenPOWER on IntegriCloud