[PATCH] D84532: [Attributor] Fix qualifier warning of the unittest
Luofan Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 20:41:54 PDT 2020
bbn updated this revision to Diff 280655.
bbn added a comment.
use C++ cast
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84532/new/
https://reviews.llvm.org/D84532
Files:
llvm/unittests/Transforms/IPO/AttributorTest.cpp
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<AAIsDead>(IRPosition::function(*F)));
+ const AbstractAttribute *AA = cast<const AbstractAttribute>(&(
+ A.getOrCreateAAFor<AAIsDead>(IRPosition::function(*F))));
EXPECT_TRUE(AA);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84532.280655.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200725/b53e1c19/attachment.bin>
More information about the llvm-commits
mailing list