From: James Molloy Date: Sat, 5 Oct 2019 08:57:17 +0000 (+0000) Subject: [UnitTests] Try and pacify gcc-5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=263faad3ed265bb1a29977019938928e7151c267;p=llvm [UnitTests] Try and pacify gcc-5 This looks like a defect in gcc-5 where it chooses a constexpr constructor from the initializer-list that it considers to be explicit. I've tried to reproduce but I can't install anything prior to gcc-6 easily on my system, and that doesn't have the error. So this is speculative pacification. Reported by Steven Wan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373820 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/TableGen/AutomataTest.cpp b/unittests/TableGen/AutomataTest.cpp index 11c03426fd8..fb19716c484 100644 --- a/unittests/TableGen/AutomataTest.cpp +++ b/unittests/TableGen/AutomataTest.cpp @@ -62,16 +62,16 @@ TEST(Automata, TupleAutomatonAccepts) { Automaton A(makeArrayRef(TupleAutomatonTransitions)); A.reset(); EXPECT_TRUE( - A.add({SK_a, SK_b, "yeet"})); + A.add(TupleAutomatonAction{SK_a, SK_b, "yeet"})); A.reset(); EXPECT_FALSE( - A.add({SK_a, SK_a, "yeet"})); + A.add(TupleAutomatonAction{SK_a, SK_a, "yeet"})); A.reset(); EXPECT_FALSE( - A.add({SK_a, SK_b, "feet"})); + A.add(TupleAutomatonAction{SK_a, SK_b, "feet"})); A.reset(); EXPECT_TRUE( - A.add({SK_b, SK_b, "foo"})); + A.add(TupleAutomatonAction{SK_b, SK_b, "foo"})); } TEST(Automata, NfaAutomatonAccepts) {