[llvm] f47dbac - llvm/unittests: Prune unused templates [-Wunused-template] (#215565)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 20:02:00 PDT 2026


Author: NAKAMURA Takumi
Date: 2026-08-12T12:01:56+09:00
New Revision: f47dbac96ee726fbeedfd80dcdcb15b6ad1d658b

URL: https://github.com/llvm/llvm-project/commit/f47dbac96ee726fbeedfd80dcdcb15b6ad1d658b
DIFF: https://github.com/llvm/llvm-project/commit/f47dbac96ee726fbeedfd80dcdcb15b6ad1d658b.diff

LOG: llvm/unittests: Prune unused templates [-Wunused-template] (#215565)

Added: 
    

Modified: 
    llvm/unittests/ADT/SmallVectorTest.cpp
    llvm/unittests/IR/IntrinsicsTest.cpp
    llvm/unittests/Support/RecyclerTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
index ebecacefcb0c5..4a32c6d2ff08a 100644
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -1063,11 +1063,6 @@ struct Emplaceable {
       : A0(std::forward<A0Ty>(A0)), A1(std::forward<A1Ty>(A1)),
         State(ES_Emplaced) {}
 
-  template <class A0Ty, class A1Ty, class A2Ty>
-  Emplaceable(A0Ty &&A0, A1Ty &&A1, A2Ty &&A2)
-      : A0(std::forward<A0Ty>(A0)), A1(std::forward<A1Ty>(A1)),
-        A2(std::forward<A2Ty>(A2)), State(ES_Emplaced) {}
-
   template <class A0Ty, class A1Ty, class A2Ty, class A3Ty>
   Emplaceable(A0Ty &&A0, A1Ty &&A1, A2Ty &&A2, A3Ty &&A3)
       : A0(std::forward<A0Ty>(A0)), A1(std::forward<A1Ty>(A1)),

diff  --git a/llvm/unittests/IR/IntrinsicsTest.cpp b/llvm/unittests/IR/IntrinsicsTest.cpp
index d502bf591b7fa..4556c8e113e14 100644
--- a/llvm/unittests/IR/IntrinsicsTest.cpp
+++ b/llvm/unittests/IR/IntrinsicsTest.cpp
@@ -57,9 +57,6 @@ class IntrinsicsTest : public ::testing::Test {
     }
     return Builder.CreateCall(Decl, ProcessedArgs);
   }
-  template <typename T> void checkIsa(const Instruction &I) {
-    EXPECT_TRUE(isa<T>(I));
-  }
 };
 
 TEST(IntrinsicNameLookup, Basic) {

diff  --git a/llvm/unittests/Support/RecyclerTest.cpp b/llvm/unittests/Support/RecyclerTest.cpp
index 696e397d3f10e..160b56b049adb 100644
--- a/llvm/unittests/Support/RecyclerTest.cpp
+++ b/llvm/unittests/Support/RecyclerTest.cpp
@@ -30,11 +30,6 @@ class DecoratedMallocAllocator : public MallocAllocator {
     DeallocCount++;
     MallocAllocator::Deallocate(Ptr, Size, Alignment);
   }
-
-  template <typename T> void Deallocate(T *Ptr) {
-    DeallocCount++;
-    MallocAllocator::Deallocate(Ptr);
-  }
 };
 
 TEST(RecyclerTest, RecycleAllocation) {


        


More information about the llvm-commits mailing list