[cfe-commits] r147589 - /cfe/trunk/include/clang/AST/APValue.h

Eli Friedman eli.friedman at gmail.com
Wed Jan 4 17:16:30 PST 2012


Author: efriedma
Date: Wed Jan  4 19:16:29 2012
New Revision: 147589

URL: http://llvm.org/viewvc/llvm-project?rev=147589&view=rev
Log:
Change casting slightly to avoid warnings about casting away const.


Modified:
    cfe/trunk/include/clang/AST/APValue.h

Modified: cfe/trunk/include/clang/AST/APValue.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/APValue.h?rev=147589&r1=147588&r2=147589&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/APValue.h (original)
+++ cfe/trunk/include/clang/AST/APValue.h Wed Jan  4 19:16:29 2012
@@ -329,11 +329,11 @@
 
   const AddrLabelExpr* getAddrLabelDiffLHS() const {
     assert(isAddrLabelDiff() && "Invalid accessor");
-    return ((AddrLabelDiffData*)(char*)Data)->LHSExpr;
+    return ((const AddrLabelDiffData*)(const char*)Data)->LHSExpr;
   }
   const AddrLabelExpr* getAddrLabelDiffRHS() const {
     assert(isAddrLabelDiff() && "Invalid accessor");
-    return ((AddrLabelDiffData*)(char*)Data)->RHSExpr;
+    return ((const AddrLabelDiffData*)(const char*)Data)->RHSExpr;
   }
 
   void setInt(const APSInt &I) {





More information about the cfe-commits mailing list