diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-03-20 20:35:57 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-03-20 20:35:57 +0000 |
commit | 5d22fcb257176bcc8823b1cddf3104737e6a237f (patch) | |
tree | 224dd08645dd3897794f3dcb1a66b2f2fc7f330f /clang/test/Analysis/simple-stream-checks.c | |
parent | 5413aaa791c2c35eca1ea041899e1666e8d46602 (diff) | |
download | bcm5719-llvm-5d22fcb257176bcc8823b1cddf3104737e6a237f.tar.gz bcm5719-llvm-5d22fcb257176bcc8823b1cddf3104737e6a237f.zip |
[analyzer] Track malloc'd memory into struct fields.
Due to improper modelling of copy constructors (specifically, their
const reference arguments), we were producing spurious leak warnings
for allocated memory stored in structs. In order to silence this, we
decided to consider storing into a struct to be the same as escaping.
However, the previous commit has fixed this issue and we can now properly
distinguish leaked memory that happens to be in a struct from a buffer
that escapes within a struct wrapper.
Originally applied in r161511, reverted in r174468.
<rdar://problem/12945937>
llvm-svn: 177571
Diffstat (limited to 'clang/test/Analysis/simple-stream-checks.c')
-rw-r--r-- | clang/test/Analysis/simple-stream-checks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Analysis/simple-stream-checks.c b/clang/test/Analysis/simple-stream-checks.c index 1fb6de3ec17..ce57fa7ac34 100644 --- a/clang/test/Analysis/simple-stream-checks.c +++ b/clang/test/Analysis/simple-stream-checks.c @@ -88,4 +88,4 @@ void testPassToSystemHeaderFunctionIndirectly() { FileStruct fs; fs.p = fopen("myfile.txt", "w"); fakeSystemHeaderCall(&fs); -} // expected leak warning +} // expected-warning {{Opened file is never closed; potential resource leak}} |