Skip to content

Commit

Permalink
[llvm] Don't rely on C++17 deduction guide for array creation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JDevlieghere committed Aug 9, 2022
1 parent aaf6c7b commit e8c807f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/FormatProviders.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

1 comment on commit e8c807f

@RiyazVP
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes a warning from gcc. See my post.

Please sign in to comment.