diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-11-02 01:54:06 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-11-02 01:54:06 +0000 |
commit | 0c153cb277ce78d88c7457170d5260982c9d4e6a (patch) | |
tree | 97090976428ea609a3099891db506ec64cad3291 /clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp | |
parent | e10d5a7659ec3458545e4274dcc57136d6151d05 (diff) | |
download | bcm5719-llvm-0c153cb277ce78d88c7457170d5260982c9d4e6a.tar.gz bcm5719-llvm-0c153cb277ce78d88c7457170d5260982c9d4e6a.zip |
[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).
Also, move the REGISTER_*_WITH_PROGRAMSTATE macros to ProgramStateTrait.h.
This doesn't get rid of /all/ explicit uses of ProgramStatePartialTrait,
but it does get a lot of them.
llvm-svn: 167276
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp index 467abd08378..981be9aeeaa 100644 --- a/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp @@ -24,9 +24,6 @@ using namespace clang; using namespace ento; -namespace { class ConstraintRange {}; } -static int ConstraintRangeIndex = 0; - /// A Range represents the closed range [from, to]. The caller must /// guarantee that from <= to. Note that Range is immutable, so as not /// to subvert RangeSet's immutability. @@ -280,17 +277,7 @@ public: }; } // end anonymous namespace -typedef llvm::ImmutableMap<SymbolRef,RangeSet> ConstraintRangeTy; - -namespace clang { -namespace ento { -template<> -struct ProgramStateTrait<ConstraintRange> - : public ProgramStatePartialTrait<ConstraintRangeTy> { - static inline void *GDMIndex() { return &ConstraintRangeIndex; } -}; -} -} +REGISTER_MAP_WITH_PROGRAMSTATE(ConstraintRange, SymbolRef, RangeSet) namespace { class RangeConstraintManager : public SimpleConstraintManager{ |