Index: llvm/unittests/Transforms/IPO/AttributorTest.cpp =================================================================== --- llvm/unittests/Transforms/IPO/AttributorTest.cpp +++ llvm/unittests/Transforms/IPO/AttributorTest.cpp @@ -44,8 +44,8 @@ Function *F = M.getFunction("foo"); - AbstractAttribute *AA = (AbstractAttribute *)&( - A.getOrCreateAAFor(IRPosition::function(*F))); + const AbstractAttribute *AA = cast(&( + A.getOrCreateAAFor(IRPosition::function(*F)))); EXPECT_TRUE(AA);