diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-05-02 21:21:42 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-05-02 21:21:42 +0000 |
commit | 9ca2851de4cc62ddd8466312603fe41bdac10eb5 (patch) | |
tree | d93413330ec2cb7f67376119656c953ea3fa15c4 /lib/StaticAnalyzer | |
parent | 1a584022c86bd0778cf7ad1fbea08c78869cf216 (diff) |
Tweak the retain/release checker to not stop tracking retained objects when calling C++ methods. This is a temporary solution to prune false positives until we have a general story using annotations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer')
-rw-r--r-- | lib/StaticAnalyzer/Core/CFRefCount.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp index 9fd7fc7d4c..366f6b0665 100644 --- a/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/lib/StaticAnalyzer/Core/CFRefCount.cpp @@ -930,6 +930,13 @@ RetainSummary* RetainSummaryManager::getSummary(const FunctionDecl* FD) { S = getPersistentStopSummary(); break; } + // For C++ methods, generate an implicit "stop" summary as well. We + // can relax this once we have a clear policy for C++ methods and + // ownership attributes. + if (isa<CXXMethodDecl>(FD)) { + S = getPersistentStopSummary(); + break; + } // [PR 3337] Use 'getAs<FunctionType>' to strip away any typedefs on the // function's type. |