[llvm] [IR][unittests] Replace of PointerType::get(Type) with opaque version (NFC) (PR #123621)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 06:28:42 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff a733c1fa90f3d26dbf399f7676e11fad0e3f5eeb a5e72d17d1f7d41d7f3ed9ddc9fea6722f9ab1c7 --extensions cpp -- llvm/unittests/CodeGen/LowLevelTypeTest.cpp llvm/unittests/FuzzMutate/OperationsTest.cpp llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp llvm/unittests/IR/ConstantsTest.cpp llvm/unittests/IR/InstructionsTest.cpp llvm/unittests/IR/VerifierTest.cpp llvm/unittests/Linker/LinkModulesTest.cpp llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/unittests/CodeGen/LowLevelTypeTest.cpp b/llvm/unittests/CodeGen/LowLevelTypeTest.cpp
index 014d527a9e..edf6280b50 100644
--- a/llvm/unittests/CodeGen/LowLevelTypeTest.cpp
+++ b/llvm/unittests/CodeGen/LowLevelTypeTest.cpp
@@ -306,8 +306,7 @@ TEST(LowLevelTypeTest, Pointer) {
       // Test Type->LLT conversion.
       Type *IRTy = PointerType::get(C, AS);
       EXPECT_EQ(Ty, getLLTForType(*IRTy, DL));
-      Type *IRVTy =
-          VectorType::get(PointerType::get(C, AS), EC);
+      Type *IRVTy = VectorType::get(PointerType::get(C, AS), EC);
       EXPECT_EQ(VTy, getLLTForType(*IRVTy, DL));
     }
   }
diff --git a/llvm/unittests/FuzzMutate/OperationsTest.cpp b/llvm/unittests/FuzzMutate/OperationsTest.cpp
index b3ccfdd4fa..e4ee6d96ba 100644
--- a/llvm/unittests/FuzzMutate/OperationsTest.cpp
+++ b/llvm/unittests/FuzzMutate/OperationsTest.cpp
@@ -93,8 +93,7 @@ TEST(OperationsTest, SourcePreds) {
   Constant *v8i1 = ConstantVector::getSplat(ElementCount::getFixed(8), i1);
   Constant *v8i8 = ConstantVector::getSplat(ElementCount::getFixed(8), i8);
   Constant *v4f16 = ConstantVector::getSplat(ElementCount::getFixed(4), f16);
-  Constant *p0i32 =
-      ConstantPointerNull::get(PointerType::get(Ctx, 0));
+  Constant *p0i32 = ConstantPointerNull::get(PointerType::get(Ctx, 0));
   Constant *v8p0i32 =
       ConstantVector::getSplat(ElementCount::getFixed(8), p0i32);
   Constant *vni32 = ConstantVector::getSplat(ElementCount::getScalable(8), i32);

``````````

</details>


https://github.com/llvm/llvm-project/pull/123621


More information about the llvm-commits mailing list