llvm.org GIT mirror llvm / 31659fa
Improve r172464: const_cast is not needed if the variable is not const git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172474 91177308-0d34-0410-b5e6-96231b3b80d8 Dmitri Gribenko 6 years ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4343 Use* many = (Use*)calloc(sizeof(Use), 8212 + 1);
4444 ASSERT_TRUE(many);
4545 Use::initTags(many, many + 8212);
46 for (const Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
46 for (Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
4747 {
48 EXPECT_EQ(reinterpret_cast(const_cast(Ue + 1)),
49 U->getUser());
48 EXPECT_EQ(reinterpret_cast(Ue + 1), U->getUser());
5049 }
5150 }
5251