diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2012-07-17 06:25:13 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2012-07-17 06:25:13 +0000 |
commit | e4ed215ccf35d4407916cd0223de26f87ccbb055 (patch) | |
tree | e6a3ec0e2b19091fb85112217353dec9ffd64132 | |
parent | df9b933aa354b8108cee028cc4726cfa9f2df62c (diff) |
Fixed few warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160345 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index ce3eb1db83..d173fac8af 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -326,16 +326,22 @@ class LocAsInteger : public NonLoc { public: Loc getLoc() const { - return cast<Loc>(((std::pair<SVal, uintptr_t>*) Data)->first); + const std::pair<SVal, uintptr_t> *D = + static_cast<const std::pair<SVal, unsigned> *>(Data); + return cast<Loc>(D->first); } const Loc& getPersistentLoc() const { - const SVal& V = ((std::pair<SVal, uintptr_t>*) Data)->first; + const std::pair<SVal, uintptr_t> *D = + static_cast<const std::pair<SVal, unsigned> *>(Data); + const SVal& V = D->first; return cast<Loc>(V); } unsigned getNumBits() const { - return ((std::pair<SVal, unsigned>*) Data)->second; + const std::pair<SVal, uintptr_t> *D = + static_cast<const std::pair<SVal, unsigned> *>(Data); + return D->second; } // Implement isa<T> support. |