From: Eli Friedman Date: Thu, 5 Jan 2012 01:16:29 +0000 (+0000) Subject: Change casting slightly to avoid warnings about casting away const. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6cc6d728e9b151defe9e6041aaeb000f6e20c24;p=clang Change casting slightly to avoid warnings about casting away const. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147589 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/APValue.h b/include/clang/AST/APValue.h index bc7138565b..f361f0f5c8 100644 --- a/include/clang/AST/APValue.h +++ b/include/clang/AST/APValue.h @@ -329,11 +329,11 @@ public: 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) {