From e4ed215ccf35d4407916cd0223de26f87ccbb055 Mon Sep 17 00:00:00 2001 From: Galina Kistanova Date: Tue, 17 Jul 2012 06:25:13 +0000 Subject: [PATCH] Fixed few warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160345 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../clang/StaticAnalyzer/Core/PathSensitive/SVals.h | 12 +++++++++--- 1 file 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(((std::pair*) Data)->first); + const std::pair *D = + static_cast *>(Data); + return cast(D->first); } const Loc& getPersistentLoc() const { - const SVal& V = ((std::pair*) Data)->first; + const std::pair *D = + static_cast *>(Data); + const SVal& V = D->first; return cast(V); } unsigned getNumBits() const { - return ((std::pair*) Data)->second; + const std::pair *D = + static_cast *>(Data); + return D->second; } // Implement isa support. -- 2.40.0