diff options
author | Anna Zaks <ganna@apple.com> | 2012-06-20 23:35:57 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-06-20 23:35:57 +0000 |
commit | 886dfb8cfa01d963803f872d9d756fcc11f650fb (patch) | |
tree | 6afe7b4edabe8884d173ca45eb34dfad1091fa9e /clang/lib/StaticAnalyzer | |
parent | 15019879511d98b8c489c857eba110b85f7b1a8c (diff) | |
download | bcm5719-llvm-886dfb8cfa01d963803f872d9d756fcc11f650fb.tar.gz bcm5719-llvm-886dfb8cfa01d963803f872d9d756fcc11f650fb.zip |
[analyzer] Malloc leak false positive: Allow xpc context to escape.
llvm-svn: 158875
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 48fdec2d3f9..3171c03eb02 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -1298,6 +1298,12 @@ bool MallocChecker::doesNotFreeMemory(const CallOrObjCMessage *Call, if (FName.equals("pthread_setspecific")) return false; + // White list xpc connection context. + // TODO: Ensure that the deallocation actually happens, need to reason + // about "xpc_connection_set_finalizer_f". + if (FName.equals("xpc_connection_set_context")) + return false; + // White list the 'XXXNoCopy' ObjC functions. if (FName.endswith("NoCopy")) { // Look for the deallocator argument. We know that the memory ownership |