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 | e9f364f658bdd13a62750bb6dd993c43e837f4b6 (patch) | |
| tree | b23028aee5d2581f6df4a7c57ac48fa5e9331bf3 /clang/lib/StaticAnalyzer/Core/CFRefCount.cpp | |
| parent | d5c45f6738b5c6952be327abc5bff294ff4b23be (diff) | |
| download | bcm5719-llvm-e9f364f658bdd13a62750bb6dd993c43e837f4b6.tar.gz bcm5719-llvm-e9f364f658bdd13a62750bb6dd993c43e837f4b6.zip | |
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.
llvm-svn: 130726
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CFRefCount.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/CFRefCount.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp index 9fd7fc7d4cb..366f6b0665c 100644 --- a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/clang/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. |

