[flang-commits] [flang] 05de4b4 - Put back the trailing commas on TYPED_TEST_SUITE

Benjamin Kramer via flang-commits flang-commits at lists.llvm.org
Mon May 17 05:14:38 PDT 2021


Author: Benjamin Kramer
Date: 2021-05-17T14:14:13+02:00
New Revision: 05de4b413930418b60c0dd1e72681b476b50e7fb

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

LOG: Put back the trailing commas on TYPED_TEST_SUITE

This avoids a -pedantic warning:
warning: ISO C++11 requires at least one argument for the "..." in a variadic macro

See also https://github.com/google/googletest/issues/2271

Added: 
    

Modified: 
    clang/unittests/StaticAnalyzer/RangeSetTest.cpp
    flang/unittests/RuntimeGTest/CharacterTest.cpp
    llvm/unittests/ADT/BitVectorTest.cpp
    llvm/unittests/ADT/DenseMapTest.cpp
    llvm/unittests/ADT/DenseSetTest.cpp
    llvm/unittests/ADT/IListBaseTest.cpp
    llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
    llvm/unittests/ADT/MapVectorTest.cpp
    llvm/unittests/ADT/PriorityWorklistTest.cpp
    llvm/unittests/ADT/RangeAdapterTest.cpp
    llvm/unittests/ADT/STLForwardCompatTest.cpp
    llvm/unittests/ADT/SmallVectorTest.cpp
    llvm/unittests/ADT/TinyPtrVectorTest.cpp
    llvm/unittests/IR/PatternMatch.cpp
    llvm/unittests/IR/ValueMapTest.cpp
    llvm/unittests/Support/MathExtrasTest.cpp
    llvm/unittests/XRay/FDRProducerConsumerTest.cpp
    llvm/unittests/XRay/FDRRecordPrinterTest.cpp
    llvm/unittests/XRay/GraphTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/StaticAnalyzer/RangeSetTest.cpp b/clang/unittests/StaticAnalyzer/RangeSetTest.cpp
index c29a5eef00e16..6d9d70277d9d3 100644
--- a/clang/unittests/StaticAnalyzer/RangeSetTest.cpp
+++ b/clang/unittests/StaticAnalyzer/RangeSetTest.cpp
@@ -188,7 +188,7 @@ llvm::APSInt RangeSetTest<BaseType>::Base{sizeof(BaseType) * 8, !isSigned()};
 
 using IntTypes = ::testing::Types<int8_t, uint8_t, int16_t, uint16_t, int32_t,
                                   uint32_t, int64_t, uint64_t>;
-TYPED_TEST_SUITE(RangeSetTest, IntTypes);
+TYPED_TEST_SUITE(RangeSetTest, IntTypes, );
 
 TYPED_TEST(RangeSetTest, RangeSetNegateTest) {
   // Use next values of the range {MIN, A, B, MID, C, D, MAX}.

diff  --git a/flang/unittests/RuntimeGTest/CharacterTest.cpp b/flang/unittests/RuntimeGTest/CharacterTest.cpp
index ff43e99ae61c5..536855306575e 100644
--- a/flang/unittests/RuntimeGTest/CharacterTest.cpp
+++ b/flang/unittests/RuntimeGTest/CharacterTest.cpp
@@ -111,7 +111,7 @@ struct CharacterComparisonTests : public ::testing::Test {
 };
 
 using CharacterTypes = ::testing::Types<char, char16_t, char32_t>;
-TYPED_TEST_SUITE(CharacterComparisonTests, CharacterTypes);
+TYPED_TEST_SUITE(CharacterComparisonTests, CharacterTypes, );
 
 TYPED_TEST(CharacterComparisonTests, CompareCharacters) {
   for (auto &[x, y, xBytes, yBytes, expect] : this->parameters) {
@@ -204,7 +204,7 @@ void RunExtremumTests(const char *which,
 }
 
 template <typename CHAR> struct ExtremumTests : public ::testing::Test {};
-TYPED_TEST_SUITE(ExtremumTests, CharacterTypes);
+TYPED_TEST_SUITE(ExtremumTests, CharacterTypes, );
 
 TYPED_TEST(ExtremumTests, MinTests) {
   static std::vector<ExtremumTestCase> tests{
@@ -284,7 +284,7 @@ void RunSearchTests(const char *which,
 }
 
 template <typename CHAR> struct SearchTests : public ::testing::Test {};
-TYPED_TEST_SUITE(SearchTests, CharacterTypes);
+TYPED_TEST_SUITE(SearchTests, CharacterTypes, );
 
 TYPED_TEST(SearchTests, IndexTests) {
   static SearchFunctions functions{

diff  --git a/llvm/unittests/ADT/BitVectorTest.cpp b/llvm/unittests/ADT/BitVectorTest.cpp
index 858adb36f22e4..7ab4ab9a9d06e 100644
--- a/llvm/unittests/ADT/BitVectorTest.cpp
+++ b/llvm/unittests/ADT/BitVectorTest.cpp
@@ -21,7 +21,7 @@ class BitVectorTest : public ::testing::Test { };
 
 // Test both BitVector and SmallBitVector with the same suite of tests.
 typedef ::testing::Types<BitVector, SmallBitVector> BitVectorTestTypes;
-TYPED_TEST_SUITE(BitVectorTest, BitVectorTestTypes);
+TYPED_TEST_SUITE(BitVectorTest, BitVectorTestTypes, );
 
 TYPED_TEST(BitVectorTest, TrivialOperation) {
   TypeParam Vec;

diff  --git a/llvm/unittests/ADT/DenseMapTest.cpp b/llvm/unittests/ADT/DenseMapTest.cpp
index e9fe4cb8d5cd2..58eac978157ec 100644
--- a/llvm/unittests/ADT/DenseMapTest.cpp
+++ b/llvm/unittests/ADT/DenseMapTest.cpp
@@ -105,7 +105,7 @@ typedef ::testing::Types<DenseMap<uint32_t, uint32_t>,
                          SmallDenseMap<CtorTester, CtorTester, 4,
                                        CtorTesterMapInfo>
                          > DenseMapTestTypes;
-TYPED_TEST_SUITE(DenseMapTest, DenseMapTestTypes);
+TYPED_TEST_SUITE(DenseMapTest, DenseMapTestTypes, );
 
 // Empty map tests
 TYPED_TEST(DenseMapTest, EmptyIntMapTest) {

diff  --git a/llvm/unittests/ADT/DenseSetTest.cpp b/llvm/unittests/ADT/DenseSetTest.cpp
index 1320e283c59aa..82ac1d8bff0f2 100644
--- a/llvm/unittests/ADT/DenseSetTest.cpp
+++ b/llvm/unittests/ADT/DenseSetTest.cpp
@@ -68,7 +68,7 @@ typedef ::testing::Types<DenseSet<unsigned, TestDenseSetInfo>,
                          const SmallDenseSet<unsigned, 4, TestDenseSetInfo>,
                          SmallDenseSet<unsigned, 64, TestDenseSetInfo>>
     DenseSetTestTypes;
-TYPED_TEST_SUITE(DenseSetTest, DenseSetTestTypes);
+TYPED_TEST_SUITE(DenseSetTest, DenseSetTestTypes, );
 
 TYPED_TEST(DenseSetTest, Constructor) {
   constexpr unsigned a[] = {1, 2, 4};

diff  --git a/llvm/unittests/ADT/IListBaseTest.cpp b/llvm/unittests/ADT/IListBaseTest.cpp
index f4783c46f4194..1c55eac5c5312 100644
--- a/llvm/unittests/ADT/IListBaseTest.cpp
+++ b/llvm/unittests/ADT/IListBaseTest.cpp
@@ -19,7 +19,7 @@ template <typename T> class IListBaseTest : public ::testing::Test {};
 // Test variants with the same test.
 typedef ::testing::Types<ilist_base<false>, ilist_base<true>>
     IListBaseTestTypes;
-TYPED_TEST_SUITE(IListBaseTest, IListBaseTestTypes);
+TYPED_TEST_SUITE(IListBaseTest, IListBaseTestTypes, );
 
 TYPED_TEST(IListBaseTest, insertBeforeImpl) {
   typedef TypeParam list_base_type;

diff  --git a/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp b/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
index e35b78484f53a..e4b649837f6f0 100644
--- a/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
+++ b/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
@@ -28,7 +28,7 @@ template <typename T> struct IntrusiveRefCntPtrTest : testing::Test {};
 typedef ::testing::Types<SimpleRefCounted<RefCountedBase>,
                          SimpleRefCounted<ThreadSafeRefCountedBase>>
     IntrusiveRefCntTypes;
-TYPED_TEST_SUITE(IntrusiveRefCntPtrTest, IntrusiveRefCntTypes);
+TYPED_TEST_SUITE(IntrusiveRefCntPtrTest, IntrusiveRefCntTypes, );
 
 TYPED_TEST(IntrusiveRefCntPtrTest, RefCountedBaseCopyDoesNotLeak) {
   EXPECT_EQ(0, NumInstances);

diff  --git a/llvm/unittests/ADT/MapVectorTest.cpp b/llvm/unittests/ADT/MapVectorTest.cpp
index 92583e940d9c1..552f9956bdc2c 100644
--- a/llvm/unittests/ADT/MapVectorTest.cpp
+++ b/llvm/unittests/ADT/MapVectorTest.cpp
@@ -162,7 +162,7 @@ template <class IntType> struct MapVectorMappedTypeTest : ::testing::Test {
 
 using MapIntTypes = ::testing::Types<int, long, long long, unsigned,
                                      unsigned long, unsigned long long>;
-TYPED_TEST_SUITE(MapVectorMappedTypeTest, MapIntTypes);
+TYPED_TEST_SUITE(MapVectorMappedTypeTest, MapIntTypes, );
 
 TYPED_TEST(MapVectorMappedTypeTest, DifferentDenseMap) {
   // Test that using a map with a mapped type other than 'unsigned' compiles

diff  --git a/llvm/unittests/ADT/PriorityWorklistTest.cpp b/llvm/unittests/ADT/PriorityWorklistTest.cpp
index 42dca48d62fc0..f12d32ac9f496 100644
--- a/llvm/unittests/ADT/PriorityWorklistTest.cpp
+++ b/llvm/unittests/ADT/PriorityWorklistTest.cpp
@@ -22,7 +22,7 @@ using namespace llvm;
 template <typename T> class PriorityWorklistTest : public ::testing::Test {};
 typedef ::testing::Types<PriorityWorklist<int>, SmallPriorityWorklist<int, 2>>
     TestTypes;
-TYPED_TEST_SUITE(PriorityWorklistTest, TestTypes);
+TYPED_TEST_SUITE(PriorityWorklistTest, TestTypes, );
 
 TYPED_TEST(PriorityWorklistTest, Basic) {
   TypeParam W;

diff  --git a/llvm/unittests/ADT/RangeAdapterTest.cpp b/llvm/unittests/ADT/RangeAdapterTest.cpp
index ba37bcfd3d840..3c68103e17452 100644
--- a/llvm/unittests/ADT/RangeAdapterTest.cpp
+++ b/llvm/unittests/ADT/RangeAdapterTest.cpp
@@ -129,7 +129,7 @@ template <typename T> class RangeAdapterLValueTest : public ::testing::Test {};
 
 typedef ::testing::Types<std::vector<int>, std::list<int>, int[4]>
     RangeAdapterLValueTestTypes;
-TYPED_TEST_SUITE(RangeAdapterLValueTest, RangeAdapterLValueTestTypes);
+TYPED_TEST_SUITE(RangeAdapterLValueTest, RangeAdapterLValueTestTypes, );
 
 TYPED_TEST(RangeAdapterLValueTest, TrivialOperation) {
   TypeParam v = {0, 1, 2, 3};
@@ -145,7 +145,7 @@ typedef ::testing::Types<std::vector<int>, std::list<int>, CustomIteratorVector,
                          ReverseOnlyVector, BidirectionalVector,
                          BidirectionalVectorConsts>
     RangeAdapterRValueTestTypes;
-TYPED_TEST_SUITE(RangeAdapterRValueTest, RangeAdapterRValueTestTypes);
+TYPED_TEST_SUITE(RangeAdapterRValueTest, RangeAdapterRValueTestTypes, );
 
 TYPED_TEST(RangeAdapterRValueTest, TrivialOperation) {
   TestRev(reverse(TypeParam({0, 1, 2, 3})));

diff  --git a/llvm/unittests/ADT/STLForwardCompatTest.cpp b/llvm/unittests/ADT/STLForwardCompatTest.cpp
index e8521fad26632..12bf4031235db 100644
--- a/llvm/unittests/ADT/STLForwardCompatTest.cpp
+++ b/llvm/unittests/ADT/STLForwardCompatTest.cpp
@@ -60,7 +60,7 @@ using STLForwardCompatRemoveCVRefTestTypes = ::testing::Types<
     >;
 
 TYPED_TEST_SUITE(STLForwardCompatRemoveCVRefTest,
-                STLForwardCompatRemoveCVRefTestTypes);
+                 STLForwardCompatRemoveCVRefTestTypes, );
 
 TYPED_TEST(STLForwardCompatRemoveCVRefTest, RemoveCVRef) {
   using From = typename TypeParam::first_type;

diff  --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
index 4673c659382d4..06b98efe66efb 100644
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -208,7 +208,7 @@ typedef ::testing::Types<SmallVector<Constructable, 0>,
                          SmallVector<Constructable, 4>,
                          SmallVector<Constructable, 5>
                          > SmallVectorTestTypes;
-TYPED_TEST_SUITE(SmallVectorTest, SmallVectorTestTypes);
+TYPED_TEST_SUITE(SmallVectorTest, SmallVectorTestTypes, );
 
 // Constructor test.
 TYPED_TEST(SmallVectorTest, ConstructorNonIterTest) {
@@ -811,7 +811,7 @@ typedef ::testing::Types<
     std::pair<SmallVector<Constructable, 2>, SmallVector<Constructable, 2>>
   > DualSmallVectorTestTypes;
 
-TYPED_TEST_SUITE(DualSmallVectorsTest, DualSmallVectorTestTypes);
+TYPED_TEST_SUITE(DualSmallVectorsTest, DualSmallVectorTestTypes, );
 
 TYPED_TEST(DualSmallVectorsTest, MoveAssignment) {
   SCOPED_TRACE("MoveAssignTest-DualVectorTypes");
@@ -1096,7 +1096,7 @@ using SmallVectorReferenceInvalidationTestTypes =
     ::testing::Types<SmallVector<int, 3>, SmallVector<Constructable, 3>>;
 
 TYPED_TEST_SUITE(SmallVectorReferenceInvalidationTest,
-                SmallVectorReferenceInvalidationTestTypes);
+                 SmallVectorReferenceInvalidationTestTypes, );
 
 TYPED_TEST(SmallVectorReferenceInvalidationTest, PushBack) {
   // Note: setup adds [1, 2, ...] to V until it's at capacity in small mode.
@@ -1383,7 +1383,7 @@ using SmallVectorInternalReferenceInvalidationTestTypes =
                      SmallVector<std::pair<Constructable, Constructable>, 3>>;
 
 TYPED_TEST_SUITE(SmallVectorInternalReferenceInvalidationTest,
-                SmallVectorInternalReferenceInvalidationTestTypes);
+                 SmallVectorInternalReferenceInvalidationTestTypes, );
 
 TYPED_TEST(SmallVectorInternalReferenceInvalidationTest, EmplaceBack) {
   // Note: setup adds [1, 2, ...] to V until it's at capacity in small mode.

diff  --git a/llvm/unittests/ADT/TinyPtrVectorTest.cpp b/llvm/unittests/ADT/TinyPtrVectorTest.cpp
index d59bd7f4c5b47..a78f5b0d32aac 100644
--- a/llvm/unittests/ADT/TinyPtrVectorTest.cpp
+++ b/llvm/unittests/ADT/TinyPtrVectorTest.cpp
@@ -83,7 +83,7 @@ class TinyPtrVectorTest : public testing::Test {
 typedef ::testing::Types<TinyPtrVector<int *>, TinyPtrVector<double *>,
                          TinyPtrVector<PointerIntPair<int *, 1>>>
     TinyPtrVectorTestTypes;
-TYPED_TEST_SUITE(TinyPtrVectorTest, TinyPtrVectorTestTypes);
+TYPED_TEST_SUITE(TinyPtrVectorTest, TinyPtrVectorTestTypes, );
 
 TYPED_TEST(TinyPtrVectorTest, EmptyTest) {
   this->expectValues(this->V, this->testArray(0));

diff  --git a/llvm/unittests/IR/PatternMatch.cpp b/llvm/unittests/IR/PatternMatch.cpp
index 31b312ba35d15..0430a0db03a5f 100644
--- a/llvm/unittests/IR/PatternMatch.cpp
+++ b/llvm/unittests/IR/PatternMatch.cpp
@@ -1641,7 +1641,7 @@ template <typename T> struct MutableConstTest : PatternMatchTest { };
 typedef ::testing::Types<std::tuple<Value*, Instruction*>,
                          std::tuple<const Value*, const Instruction *>>
     MutableConstTestTypes;
-TYPED_TEST_SUITE(MutableConstTest, MutableConstTestTypes);
+TYPED_TEST_SUITE(MutableConstTest, MutableConstTestTypes, );
 
 TYPED_TEST(MutableConstTest, ICmp) {
   auto &IRB = PatternMatchTest::IRB;

diff  --git a/llvm/unittests/IR/ValueMapTest.cpp b/llvm/unittests/IR/ValueMapTest.cpp
index 57f2b7bea19ae..06d5378855351 100644
--- a/llvm/unittests/IR/ValueMapTest.cpp
+++ b/llvm/unittests/IR/ValueMapTest.cpp
@@ -35,7 +35,7 @@ class ValueMapTest : public testing::Test {
 // Run everything on Value*, a subtype to make sure that casting works as
 // expected, and a const subtype to make sure we cast const correctly.
 typedef ::testing::Types<Value, Instruction, const Instruction> KeyTypes;
-TYPED_TEST_SUITE(ValueMapTest, KeyTypes);
+TYPED_TEST_SUITE(ValueMapTest, KeyTypes, );
 
 TYPED_TEST(ValueMapTest, Null) {
   ValueMap<TypeParam*, int> VM1;

diff  --git a/llvm/unittests/Support/MathExtrasTest.cpp b/llvm/unittests/Support/MathExtrasTest.cpp
index 50dd1513e0274..6088fdc1e5a83 100644
--- a/llvm/unittests/Support/MathExtrasTest.cpp
+++ b/llvm/unittests/Support/MathExtrasTest.cpp
@@ -483,7 +483,7 @@ class OverflowTest : public ::testing::Test { };
 using OverflowTestTypes = ::testing::Types<signed char, short, int, long,
                                            long long>;
 
-TYPED_TEST_SUITE(OverflowTest, OverflowTestTypes);
+TYPED_TEST_SUITE(OverflowTest, OverflowTestTypes, );
 
 TYPED_TEST(OverflowTest, AddNoOverflow) {
   TypeParam Result;

diff  --git a/llvm/unittests/XRay/FDRProducerConsumerTest.cpp b/llvm/unittests/XRay/FDRProducerConsumerTest.cpp
index f96ba55476d32..7b9eed7daba28 100644
--- a/llvm/unittests/XRay/FDRProducerConsumerTest.cpp
+++ b/llvm/unittests/XRay/FDRProducerConsumerTest.cpp
@@ -208,14 +208,14 @@ using RecordTypes =
     ::testing::Types<NewBufferRecord, NewCPUIDRecord, TSCWrapRecord,
                      WallclockRecord, CustomEventRecord, CallArgRecord,
                      PIDRecord, FunctionRecord>;
-INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTest, RecordTypes);
+INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTest, RecordTypes, );
 
 // For V5, we have two new types we're supporting.
 using RecordTypesV5 =
     ::testing::Types<NewBufferRecord, NewCPUIDRecord, TSCWrapRecord,
                      WallclockRecord, CustomEventRecordV5, TypedEventRecord,
                      CallArgRecord, PIDRecord, FunctionRecord>;
-INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTestV5, RecordTypesV5);
+INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTestV5, RecordTypesV5, );
 
 } // namespace
 } // namespace xray

diff  --git a/llvm/unittests/XRay/FDRRecordPrinterTest.cpp b/llvm/unittests/XRay/FDRRecordPrinterTest.cpp
index a1fb8c3183dbe..a29112f899e1f 100644
--- a/llvm/unittests/XRay/FDRRecordPrinterTest.cpp
+++ b/llvm/unittests/XRay/FDRRecordPrinterTest.cpp
@@ -122,7 +122,7 @@ using FDRRecordTypes =
                      NewCPUIDRecord, TSCWrapRecord, WallclockRecord,
                      CustomEventRecord, CallArgRecord, BufferExtents,
                      PIDRecord>;
-INSTANTIATE_TYPED_TEST_SUITE_P(Records, PrinterTest, FDRRecordTypes);
+INSTANTIATE_TYPED_TEST_SUITE_P(Records, PrinterTest, FDRRecordTypes, );
 
 TEST(FDRRecordPrinterTest, WriteFunctionRecordEnter) {
   std::string Data;

diff  --git a/llvm/unittests/XRay/GraphTest.cpp b/llvm/unittests/XRay/GraphTest.cpp
index f9453f57ebf02..424fed13c17ab 100644
--- a/llvm/unittests/XRay/GraphTest.cpp
+++ b/llvm/unittests/XRay/GraphTest.cpp
@@ -59,7 +59,7 @@ typedef ::testing::Types<GraphT, const GraphT> GraphTestTypes;
 using VVT = typename GraphT::VertexValueType;
 using EVT = typename GraphT::EdgeValueType;
 
-TYPED_TEST_SUITE(GraphTest, GraphTestTypes);
+TYPED_TEST_SUITE(GraphTest, GraphTestTypes, );
 
 template <typename T> void graphVertexTester(T &G) {
   std::set<unsigned> V({1u, 2u, 3u, 4u, 5u, 6u});


        


More information about the flang-commits mailing list