diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-11-05 16:58:00 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-11-05 16:58:00 +0000 |
commit | 40d8551890bc8454c4e0a28c9072c9c1d1dd588a (patch) | |
tree | e77c9f5ae468586572dc167c08906c0d0ae28057 /lib | |
parent | d096acc220fc72ec73c2abf21d6c251d867e950d (diff) |
[analyzer] Move convenience REGISTER_*_WITH_PROGRAMSTATE to CheckerContext.h
As Anna pointed out, ProgramStateTrait.h is a relatively obscure header,
and checker writers may not know to look there to add their own custom
state.
The base macro that specializes the template remains in ProgramStateTrait.h
(REGISTER_TRAIT_WITH_PROGRAMSTATE), which allows the analyzer core to keep
using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp | 5 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/ProgramState.cpp | 6 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/RangeConstraintManager.cpp | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp b/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp index f5e319fb82..3c1c412af5 100644 --- a/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp @@ -450,8 +450,9 @@ namespace { DynamicDispatchModeConservative }; } -REGISTER_MAP_WITH_PROGRAMSTATE(DynamicDispatchBifurcationMap, - const MemRegion *, unsigned) +REGISTER_TRAIT_WITH_PROGRAMSTATE(DynamicDispatchBifurcationMap, + CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, + unsigned)) bool ExprEngine::inlineCall(const CallEvent &Call, const Decl *D, NodeBuilder &Bldr, ExplodedNode *Pred, diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp index fc57ead92c..b49a11e642 100644 --- a/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -714,9 +714,9 @@ bool ProgramState::isTainted(SymbolRef Sym, TaintTagType Kind) const { /// The GDM component containing the dynamic type info. This is a map from a /// symbol to its most likely type. -REGISTER_MAP_WITH_PROGRAMSTATE(DynamicTypeMap, - const MemRegion *, - DynamicTypeInfo) +REGISTER_TRAIT_WITH_PROGRAMSTATE(DynamicTypeMap, + CLANG_ENTO_PROGRAMSTATE_MAP(const MemRegion *, + DynamicTypeInfo)) DynamicTypeInfo ProgramState::getDynamicTypeInfo(const MemRegion *Reg) const { Reg = Reg->StripCasts(); diff --git a/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp b/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp index 981be9aeea..411094bc1d 100644 --- a/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp +++ b/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp @@ -277,7 +277,9 @@ public: }; } // end anonymous namespace -REGISTER_MAP_WITH_PROGRAMSTATE(ConstraintRange, SymbolRef, RangeSet) +REGISTER_TRAIT_WITH_PROGRAMSTATE(ConstraintRange, + CLANG_ENTO_PROGRAMSTATE_MAP(SymbolRef, + RangeSet)) namespace { class RangeConstraintManager : public SimpleConstraintManager{ |