forked from OSchip/llvm-project
				
			Improve r172464: const_cast is not needed if the variable is not const
llvm-svn: 172474
This commit is contained in:
		
							parent
							
								
									1a71168624
								
							
						
					
					
						commit
						fb37aca9d5
					
				| 
						 | 
					@ -44,10 +44,9 @@ TEST(WaymarkTest, TwoBit) {
 | 
				
			||||||
  Use* many = (Use*)calloc(sizeof(Use), 8212 + 1);
 | 
					  Use* many = (Use*)calloc(sizeof(Use), 8212 + 1);
 | 
				
			||||||
  ASSERT_TRUE(many);
 | 
					  ASSERT_TRUE(many);
 | 
				
			||||||
	Use::initTags(many, many + 8212);
 | 
						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)),
 | 
					    EXPECT_EQ(reinterpret_cast<User *>(Ue + 1), U->getUser());
 | 
				
			||||||
              U->getUser());
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue