aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Analysis/malloc-annotations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/malloc-annotations.cpp')
-rw-r--r--clang/test/Analysis/malloc-annotations.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/Analysis/malloc-annotations.cpp b/clang/test/Analysis/malloc-annotations.cpp
index d75683f..67a069d 100644
--- a/clang/test/Analysis/malloc-annotations.cpp
+++ b/clang/test/Analysis/malloc-annotations.cpp
@@ -54,19 +54,19 @@ void af1_g(MemoryAllocator &Alloc, struct stuff **pps) {
void af2(MemoryAllocator &Alloc) {
void *p = Alloc.my_malloc(12);
Alloc.my_free(p);
- free(p); // expected-warning{{Attempt to free released memory}}
+ free(p); // expected-warning{{Attempt to release already released memory}}
}
void af2b(MemoryAllocator &Alloc) {
void *p = Alloc.my_malloc(12);
free(p);
- Alloc.my_free(p); // expected-warning{{Attempt to free released memory}}
+ Alloc.my_free(p); // expected-warning{{Attempt to release already released memory}}
}
void af2c(MemoryAllocator &Alloc) {
void *p = Alloc.my_malloc(12);
free(p);
- Alloc.my_hold(p); // expected-warning{{Attempt to free released memory}}
+ Alloc.my_hold(p); // expected-warning{{Attempt to release already released memory}}
}
// No leak if malloc returns null.
@@ -81,13 +81,13 @@ void af2e(MemoryAllocator &Alloc) {
void af3(MemoryAllocator &Alloc) {
void *p = Alloc.my_malloc(12);
Alloc.my_hold(p);
- free(p); // expected-warning{{Attempt to free non-owned memory}}
+ free(p); // expected-warning{{Attempt to release non-owned memory}}
}
void * af4(MemoryAllocator &Alloc) {
void *p = Alloc.my_malloc(12);
Alloc.my_free(p);
- return p; // expected-warning{{Use of memory after it is freed}}
+ return p; // expected-warning{{Use of memory after it is released}}
}
// This case is (possibly) ok, be conservative