summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/MismatchedDeallocator-checker-test.mm
diff options
context:
space:
mode:
authorAnton Yartsev <anton.yartsev@gmail.com>2013-09-16 17:51:25 +0000
committerAnton Yartsev <anton.yartsev@gmail.com>2013-09-16 17:51:25 +0000
commitf5bcccee7628944405cad644636143b096c2799f (patch)
treea28553be68d272a86e85bae8f424c192df854b94 /clang/test/Analysis/MismatchedDeallocator-checker-test.mm
parente0e28d059bac3ef430b918f25a6eb117ec8b5caa (diff)
downloadbcm5719-llvm-f5bcccee7628944405cad644636143b096c2799f.tar.gz
bcm5719-llvm-f5bcccee7628944405cad644636143b096c2799f.zip
New message for cases when ownership is taken:
"+method_name: cannot take ownership of memory allocated by 'new'." instead of the old "Memory allocated by 'new' should be deallocated by 'delete', not +method_name" llvm-svn: 190800
Diffstat (limited to 'clang/test/Analysis/MismatchedDeallocator-checker-test.mm')
-rw-r--r--clang/test/Analysis/MismatchedDeallocator-checker-test.mm3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/test/Analysis/MismatchedDeallocator-checker-test.mm b/clang/test/Analysis/MismatchedDeallocator-checker-test.mm
index 56d46d99b0b..0df5db5191f 100644
--- a/clang/test/Analysis/MismatchedDeallocator-checker-test.mm
+++ b/clang/test/Analysis/MismatchedDeallocator-checker-test.mm
@@ -112,8 +112,7 @@ void testNew10() {
void testNew11(NSUInteger dataLength) {
int *p = new int;
- NSData *d = [NSData dataWithBytesNoCopy:p length:sizeof(int) freeWhenDone:1]; // expected-warning{{Memory allocated by 'new' should be deallocated by 'delete', not +dataWithBytesNoCopy:length:freeWhenDone:}}
- // FIXME: should be "+dataWithBytesNoCopy:length:freeWhenDone: cannot take ownership of memory allocated by 'new'."
+ NSData *d = [NSData dataWithBytesNoCopy:p length:sizeof(int) freeWhenDone:1]; // expected-warning{{+dataWithBytesNoCopy:length:freeWhenDone: cannot take ownership of memory allocated by 'new'}}
}
//-------------------------------------------------------
OpenPOWER on IntegriCloud