diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-01-31 00:57:15 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-01-31 00:57:15 +0000 |
commit | 23111dcd66ee242bb5caf1ecab01bd930ee42c4c (patch) | |
tree | 71e57de410a47583131471e3d151bfca03c4553d | |
parent | 3128fa1a5db26b288521e2b8136c6f795d34bc4f (diff) |
Convert more uses of 'const ProgramState *' to 'ProgramStateRef' (and related cleanups).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149310 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/StaticAnalyzer/Core/Checker.h | 14 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Core/CheckerManager.h | 22 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h | 4 |
3 files changed, 20 insertions, 20 deletions
diff --git a/include/clang/StaticAnalyzer/Core/Checker.h b/include/clang/StaticAnalyzer/Core/Checker.h index 99408d7b33..1e9055500a 100644 --- a/include/clang/StaticAnalyzer/Core/Checker.h +++ b/include/clang/StaticAnalyzer/Core/Checker.h @@ -230,7 +230,7 @@ public: class LiveSymbols { template <typename CHECKER> - static void _checkLiveSymbols(void *checker, const ProgramState *state, + static void _checkLiveSymbols(void *checker, ProgramStateRef state, SymbolReaper &SR) { ((const CHECKER *)checker)->checkLiveSymbols(state, SR); } @@ -260,9 +260,9 @@ public: class RegionChanges { template <typename CHECKER> - static const ProgramState * + static ProgramStateRef _checkRegionChanges(void *checker, - const ProgramState *state, + ProgramStateRef state, const StoreManager::InvalidatedSymbols *invalidated, ArrayRef<const MemRegion *> Explicits, ArrayRef<const MemRegion *> Regions) { @@ -271,7 +271,7 @@ class RegionChanges { } template <typename CHECKER> static bool _wantsRegionChangeUpdate(void *checker, - const ProgramState *state) { + ProgramStateRef state) { return ((const CHECKER *)checker)->wantsRegionChangeUpdate(state); } @@ -306,8 +306,8 @@ namespace eval { class Assume { template <typename CHECKER> - static const ProgramState *_evalAssume(void *checker, - const ProgramState *state, + static ProgramStateRef _evalAssume(void *checker, + ProgramStateRef state, const SVal &cond, bool assumption) { return ((const CHECKER *)checker)->evalAssume(state, cond, assumption); @@ -359,7 +359,7 @@ public: StringRef getTagDescription() const; /// See CheckerManager::runCheckersForPrintState. - virtual void printState(raw_ostream &Out, const ProgramState *State, + virtual void printState(raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep) const { } }; diff --git a/include/clang/StaticAnalyzer/Core/CheckerManager.h b/include/clang/StaticAnalyzer/Core/CheckerManager.h index 806085460b..a404657882 100644 --- a/include/clang/StaticAnalyzer/Core/CheckerManager.h +++ b/include/clang/StaticAnalyzer/Core/CheckerManager.h @@ -244,7 +244,7 @@ public: /// Allows modifying SymbolReaper object. For example, checkers can explicitly /// register symbols of interest as live. These symbols will not be marked /// dead and removed. - void runCheckersForLiveSymbols(const ProgramState *state, + void runCheckersForLiveSymbols(ProgramStateRef state, SymbolReaper &SymReaper); /// \brief Run checkers for dead symbols. @@ -258,7 +258,7 @@ public: ExprEngine &Eng); /// \brief True if at least one checker wants to check region changes. - bool wantsRegionChangeUpdate(const ProgramState *state); + bool wantsRegionChangeUpdate(ProgramStateRef state); /// \brief Run checkers for region changes. /// @@ -269,15 +269,15 @@ public: /// 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, + ProgramStateRef + runCheckersForRegionChanges(ProgramStateRef state, const StoreManager::InvalidatedSymbols *invalidated, ArrayRef<const MemRegion *> ExplicitRegions, ArrayRef<const MemRegion *> Regions); /// \brief Run checkers for handling assumptions on symbolic values. - const ProgramState *runCheckersForEvalAssume(const ProgramState *state, - SVal Cond, bool Assumption); + ProgramStateRef runCheckersForEvalAssume(ProgramStateRef state, + SVal Cond, bool Assumption); /// \brief Run checkers for evaluating a call. void runCheckersForEvalCall(ExplodedNodeSet &Dst, @@ -298,7 +298,7 @@ public: /// \param State The state being printed /// \param NL The preferred representation of a newline. /// \param Sep The preferred separator between different kinds of data. - void runCheckersForPrintState(raw_ostream &Out, const ProgramState *State, + void runCheckersForPrintState(raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep); //===----------------------------------------------------------------------===// @@ -345,17 +345,17 @@ public: typedef CheckerFn<void (SymbolReaper &, CheckerContext &)> CheckDeadSymbolsFunc; - typedef CheckerFn<void (const ProgramState *,SymbolReaper &)> CheckLiveSymbolsFunc; + typedef CheckerFn<void (ProgramStateRef,SymbolReaper &)> CheckLiveSymbolsFunc; - typedef CheckerFn<const ProgramState * (const ProgramState *, + typedef CheckerFn<ProgramStateRef (ProgramStateRef, const StoreManager::InvalidatedSymbols *symbols, ArrayRef<const MemRegion *> ExplicitRegions, ArrayRef<const MemRegion *> Regions)> CheckRegionChangesFunc; - typedef CheckerFn<bool (const ProgramState *)> WantsRegionChangeUpdateFunc; + typedef CheckerFn<bool (ProgramStateRef)> WantsRegionChangeUpdateFunc; - typedef CheckerFn<const ProgramState * (const ProgramState *, + typedef CheckerFn<ProgramStateRef (ProgramStateRef, const SVal &cond, bool assumption)> EvalAssumeFunc; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h index b16f049441..631858dd7c 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h @@ -33,10 +33,10 @@ public: DefinedSVal Cond, bool Assumption) = 0; - std::pair<ProgramStateRef , ProgramStateRef > + std::pair<ProgramStateRef, ProgramStateRef > assumeDual(ProgramStateRef state, DefinedSVal Cond) { - std::pair<ProgramStateRef , ProgramStateRef > res = + std::pair<ProgramStateRef, ProgramStateRef > res = std::make_pair(assume(state, Cond, true), assume(state, Cond, false)); assert(!(!res.first && !res.second) && "System is over constrained."); |