[PATCH] D84532: [Attributor] Fix qualifier warning of the unittest

Luofan Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 26 18:57:24 PDT 2020


bbn updated this revision to Diff 280767.
bbn added a comment.

remove the `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 =
+      &A.getOrCreateAAFor<AAIsDead>(IRPosition::function(*F));
 
   EXPECT_TRUE(AA);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84532.280767.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200727/18891791/attachment.bin>


More information about the llvm-commits mailing list