[llvm] Don't rely on C++17 deduction guide for array creation
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 9 Aug 2022 05:11:23 +0000 (22:11 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 9 Aug 2022 05:29:26 +0000 (22:29 -0700)
Seems like at least one bot (clang-ppc64-aix) is having trouble with the
C++17 deduction guide for array creation. Specify the template arguments
explicitly.

llvm/include/llvm/Support/FormatProviders.h

index 7cfce29..2bdc316 100644 (file)
@@ -369,7 +369,7 @@ template <typename IterT> class format_provider<llvm::iterator_range<IterT>> {
       return Default;
     }
 
-    for (const char *D : std::array{"[]", "<>", "()"}) {
+    for (const char *D : std::array<const char *, 3>{"[]", "<>", "()"}) {
       if (Style.front() != D[0])
         continue;
       size_t End = Style.find_first_of(D[1]);