summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc-annotations.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/malloc-annotations.c')
-rw-r--r--clang/test/Analysis/malloc-annotations.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/test/Analysis/malloc-annotations.c b/clang/test/Analysis/malloc-annotations.c
index 7890cfc1764..98dc2e7269b 100644
--- a/clang/test/Analysis/malloc-annotations.c
+++ b/clang/test/Analysis/malloc-annotations.c
@@ -128,12 +128,10 @@ void af3() {
free(p); // no-warning
}
-// This case would inflict a double-free elsewhere.
-// However, this case is considered an analyzer bug since it causes false-positives.
int * af4() {
int *p = my_malloc(12);
my_free(p);
- return p; // no-warning
+ return p; // expected-warning{{Use of dynamically allocated}}
}
// This case is (possibly) ok, be conservative
OpenPOWER on IntegriCloud