diff options
author | Ken Dyck <ken.dyck@onsemi.com> | 2010-01-26 17:01:47 +0000 |
---|---|---|
committer | Ken Dyck <ken.dyck@onsemi.com> | 2010-01-26 17:01:47 +0000 |
commit | b896f625d1225450c0b30c4b82cb4d9af5642b9f (patch) | |
tree | 4a615d1b18ce30f2687511d9780531340bc5e031 | |
parent | 687cc4a850b59116efee061018f0d8df50728b82 (diff) |
Replace inheritance of RegionRawOffset from std::pair with two private member
variables to improve readability and encapsulation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94550 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Checker/PathSensitive/MemRegion.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/clang/Checker/PathSensitive/MemRegion.h b/include/clang/Checker/PathSensitive/MemRegion.h index e1b21b16e2..12bc0b7956 100644 --- a/include/clang/Checker/PathSensitive/MemRegion.h +++ b/include/clang/Checker/PathSensitive/MemRegion.h @@ -249,17 +249,20 @@ public: class ElementRegion; -class RegionRawOffset : public std::pair<const MemRegion*, int64_t> { +class RegionRawOffset { private: friend class ElementRegion; + const MemRegion *Region; + int64_t Offset; + RegionRawOffset(const MemRegion* reg, int64_t offset = 0) - : std::pair<const MemRegion*, int64_t>(reg, offset) {} + : Region(reg), Offset(offset) {} public: // FIXME: Eventually support symbolic offsets. - int64_t getByteOffset() const { return second; } - const MemRegion *getRegion() const { return first; } + int64_t getByteOffset() const { return Offset; } + const MemRegion *getRegion() const { return Region; } void dumpToStream(llvm::raw_ostream& os) const; void dump() const; |