mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
Improve r172464: const_cast is not needed if the variable is not const
llvm-svn: 172474
This commit is contained in:
parent
508f7bf868
commit
521181bcca
@ -44,10 +44,9 @@ TEST(WaymarkTest, TwoBit) {
|
||||
Use* many = (Use*)calloc(sizeof(Use), 8212 + 1);
|
||||
ASSERT_TRUE(many);
|
||||
Use::initTags(many, many + 8212);
|
||||
for (const Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
|
||||
for (Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
|
||||
{
|
||||
EXPECT_EQ(reinterpret_cast<User*>(const_cast<Use *>(Ue + 1)),
|
||||
U->getUser());
|
||||
EXPECT_EQ(reinterpret_cast<User *>(Ue + 1), U->getUser());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user