[cfe-commits] r160345 - /cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
Galina Kistanova
gkistanova at gmail.com
Mon Jul 16 23:25:13 PDT 2012
Author: gkistanova
Date: Tue Jul 17 01:25:13 2012
New Revision: 160345
URL: http://llvm.org/viewvc/llvm-project?rev=160345&view=rev
Log:
Fixed few warnings.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h?rev=160345&r1=160344&r2=160345&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h Tue Jul 17 01:25:13 2012
@@ -326,16 +326,22 @@
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.
More information about the cfe-commits
mailing list