From: David Greene Date: Mon, 14 Jan 2013 21:04:35 +0000 (+0000) Subject: Fix Casts X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c8be88ab562412da359f714502e30ff61459efa0;p=oota-llvm.git Fix Casts Use const_cast<> to avoid cast-away-const errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172464 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/IR/WaymarkTest.cpp b/unittests/IR/WaymarkTest.cpp index 69fc4da5a66..1e9807554cc 100644 --- a/unittests/IR/WaymarkTest.cpp +++ b/unittests/IR/WaymarkTest.cpp @@ -46,7 +46,8 @@ TEST(WaymarkTest, TwoBit) { Use::initTags(many, many + 8212); for (const Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U) { - EXPECT_EQ((User*)(Ue + 1), U->getUser()); + EXPECT_EQ(reinterpret_cast(const_cast(Ue + 1)), + U->getUser()); } }