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: http://review.tizen.org/git/?a=commitdiff_plain;h=918a6b05f4106d2b494e7c64c7b90065efd55197;p=platform%2Fupstream%2Fllvm.git Change casting slightly to avoid warnings about casting away const. llvm-svn: 147589 --- diff --git a/clang/include/clang/AST/APValue.h b/clang/include/clang/AST/APValue.h index bc71385..f361f0f 100644 --- a/clang/include/clang/AST/APValue.h +++ b/clang/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) {