[llvm] e8c807f - [llvm] Don't rely on C++17 deduction guide for array creation

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 22:29:34 PDT 2022


Author: Jonas Devlieghere
Date: 2022-08-08T22:29:26-07:00
New Revision: e8c807fade5ff75ffe7f1395c20cfda0bc9480e3

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

LOG: [llvm] Don't rely on C++17 deduction guide for array creation

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.

Added: 
    

Modified: 
    llvm/include/llvm/Support/FormatProviders.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/FormatProviders.h b/llvm/include/llvm/Support/FormatProviders.h
index 7cfce29b134f..2bdc316a68a2 100644
--- a/llvm/include/llvm/Support/FormatProviders.h
+++ b/llvm/include/llvm/Support/FormatProviders.h
@@ -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]);


        


More information about the llvm-commits mailing list