[Attributor] Fix qualifier warning of the unittest
authorLuofan Chen <clfbbn@gmail.com>
Mon, 27 Jul 2020 14:28:39 +0000 (22:28 +0800)
committerLuofan Chen <clfbbn@gmail.com>
Mon, 27 Jul 2020 14:28:39 +0000 (22:28 +0800)
Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D84532

llvm/unittests/Transforms/IPO/AttributorTest.cpp

index 8c1682c..7d496ed 100644 (file)
@@ -44,8 +44,8 @@ TEST_F(AttributorTestBase, TestCast) {
 
   Function *F = M.getFunction("foo");
 
-  AbstractAttribute *AA = (AbstractAttribute *)&(
-      A.getOrCreateAAFor<AAIsDead>(IRPosition::function(*F)));
+  const AbstractAttribute *AA =
+      &A.getOrCreateAAFor<AAIsDead>(IRPosition::function(*F));
 
   EXPECT_TRUE(AA);