diff options
author | Anna Zaks <ganna@apple.com> | 2012-02-14 21:55:24 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-02-14 21:55:24 +0000 |
commit | 3d34834bb061295c9858080e2b3055751396fbe3 (patch) | |
tree | 2afa554e95b78b4fe064507c49783b53d72e5478 /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | |
parent | 78f815d3a47a99a7fca1046f40ad3cf75ea04822 (diff) | |
download | bcm5719-llvm-3d34834bb061295c9858080e2b3055751396fbe3.tar.gz bcm5719-llvm-3d34834bb061295c9858080e2b3055751396fbe3.zip |
[analyzer] Make Malloc Checker optimistic in presence of inlining.
(In response of Ted's review of r150112.)
This moves the logic which checked if a symbol escapes through a
parameter to invalidateRegionCallback (instead of post CallExpr visit.)
To accommodate the change, added a CallOrObjCMessage parameter to
checkRegionChanges callback.
llvm-svn: 150513
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 6678a0b5eb5..96cc2f4d2a9 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -2439,7 +2439,8 @@ public: checkRegionChanges(ProgramStateRef state, const StoreManager::InvalidatedSymbols *invalidated, ArrayRef<const MemRegion *> ExplicitRegions, - ArrayRef<const MemRegion *> Regions) const; + ArrayRef<const MemRegion *> Regions, + const CallOrObjCMessage *Call) const; bool wantsRegionChangeUpdate(ProgramStateRef state) const { return true; @@ -3303,7 +3304,8 @@ ProgramStateRef RetainCountChecker::checkRegionChanges(ProgramStateRef state, const StoreManager::InvalidatedSymbols *invalidated, ArrayRef<const MemRegion *> ExplicitRegions, - ArrayRef<const MemRegion *> Regions) const { + ArrayRef<const MemRegion *> Regions, + const CallOrObjCMessage *Call) const { if (!invalidated) return state; |