diff options
author | Jordy Rose <jediknil@belkadan.com> | 2011-08-27 22:51:26 +0000 |
---|---|---|
committer | Jordy Rose <jediknil@belkadan.com> | 2011-08-27 22:51:26 +0000 |
commit | 537716ad8dd10f984b6cfe6985afade1185c5e3c (patch) | |
tree | cfbf31fce4f4daded6e7b15c84f5c3a7a99bad0b /include/clang/StaticAnalyzer/Core/CheckerManager.h | |
parent | 96a914a50cb8c01be8a3b7481cc4791e19c4285b (diff) |
[analyzer] Change the check::RegionChanges callback to include the regions explicitly requested for invalidation.
Also, allow CallOrObjCMessage to wrap a CXXConstructExpr as well.
Finally, this allows us to remove the clunky whitelisting system from CFRefCount/RetainReleaseChecker. Slight regression due to CXXNewExprs not yet being handled in post-statement callbacks (PR forthcoming).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/CheckerManager.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/CheckerManager.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/clang/StaticAnalyzer/Core/CheckerManager.h b/include/clang/StaticAnalyzer/Core/CheckerManager.h index ffbecedd13..fdc6055bb4 100644 --- a/include/clang/StaticAnalyzer/Core/CheckerManager.h +++ b/include/clang/StaticAnalyzer/Core/CheckerManager.h @@ -238,11 +238,19 @@ public: bool wantsRegionChangeUpdate(const ProgramState *state); /// \brief Run checkers for region changes. + /// + /// This corresponds to the check::RegionChanges callback. + /// \param state The current program state. + /// \param invalidated A set of all symbols potentially touched by the change. + /// \param ExplicitRegions The regions explicitly requested for invalidation. + /// For example, in the case of a function call, these would be arguments. + /// \param Regions The transitive closure of accessible regions, + /// i.e. all regions that may have been touched by this change. const ProgramState * runCheckersForRegionChanges(const ProgramState *state, const StoreManager::InvalidatedSymbols *invalidated, - const MemRegion * const *Begin, - const MemRegion * const *End); + ArrayRef<const MemRegion *> ExplicitRegions, + ArrayRef<const MemRegion *> Regions); /// \brief Run checkers for handling assumptions on symbolic values. const ProgramState *runCheckersForEvalAssume(const ProgramState *state, @@ -305,8 +313,8 @@ public: typedef CheckerFn<const ProgramState * (const ProgramState *, const StoreManager::InvalidatedSymbols *symbols, - const MemRegion * const *begin, - const MemRegion * const *end)> + ArrayRef<const MemRegion *> ExplicitRegions, + ArrayRef<const MemRegion *> Regions)> CheckRegionChangesFunc; typedef CheckerFn<bool (const ProgramState *)> WantsRegionChangeUpdateFunc; |