<div dir="ltr"><div>Hey Dave,</div><div><br></div><div>Apologies for missing this e-mail. This somehow got caught in a mail filter and never made it to my inbox. I only saw the thread because someone else pinged me directly about it. Not sure if there's a way in Gmail to debug this after the fact, but I've made some changes to my mail rules that should prevent this in the future. </div><div><br></div><div>As far as the change is concerned, I agree that it's unfortunate that we need these workarounds. I suspect that it's a bug in the modules implementation, but I have no evidence to back that up and I'm not familiar enough with that part of clang to productively investigate that issue myself. I've filed a radar on the folks that maintain that part of clang. My motivation was limited to getting the LLDB bot building again after the C++17 migration broke it. </div><div><br></div><div>We have (unfortunately) a bunch of workarounds in LLVM, often for quirks in other compilers and older standard libraries. I don't think this is any different except maybe that we have a little bit more agency here because it's clang itself. To answer your question/concern: like those other quirks, I wouldn't expect anyone to actively go out of their way to avoid this construct. Like those other quirks, I think it's totally fair to deal with those issues in a reactive matter, that is if we didn't fix the issue ourselves already, which Adrian (CC'd) has been silently doing for the majority of the modules issues. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 3, 2022 at 9:19 AM Philip Reames <<a href="mailto:listmail@philipreames.com">listmail@philipreames.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Jonas,<br>
<br>
This thread has now been pinged 7 times over nearly two months. A basic <br>
expectation of all LLVM developers is to reply promptly to post commit <br>
review feedback.  Please reply to the original question on this thread.  <br>
Please treat this matter as urgent.<br>
<br>
Philip<br></blockquote><div><br></div><div>Hey Philip,</div><div><br></div><div>I'm sure this was well intended, but evidently I didn't see this thread or I would've responded. An off-list ping or a DM on Discord would've gone a long way.</div><div><br></div><div>Cheers,</div><div>Jonas</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
On 10/3/22 09:04, David Blaikie via llvm-commits wrote:<br>
> Ping<br>
><br>
> On Mon, Sep 26, 2022 at 8:41 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>> Ping<br>
>><br>
>> On Mon, Sep 19, 2022 at 8:02 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>>> Ping<br>
>>><br>
>>> On Mon, Sep 12, 2022 at 9:07 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>>>> ping<br>
>>>><br>
>>>> On Mon, Aug 22, 2022 at 12:52 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>>>>> Ping<br>
>>>>><br>
>>>>> On Mon, Aug 15, 2022 at 3:20 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>>>>>> Ping<br>
>>>>>><br>
>>>>>> On Tue, Aug 9, 2022 at 8:27 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>>>>>>> These "I don't know why they work but they do" Workarounds continue to happen for modules & they're pretty unsatisfying.<br>
>>>>>>><br>
>>>>>>> Any chance you could look into this a bit more to understand why they're broken/why this is the right fix? (partly because I expect we have quite a few range-based-for loops with initializer lists, and figuring out when some need explicit types and some don't seems like it'd be hard and confusing going forward)<br>
>>>>>>><br>
>>>>>>> On Mon, Aug 8, 2022 at 3:04 PM Jonas Devlieghere via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>>>>>>>><br>
>>>>>>>> Author: Jonas Devlieghere<br>
>>>>>>>> Date: 2022-08-08T15:04:46-07:00<br>
>>>>>>>> New Revision: db008af501534d4590542253ae3acf783986f5f7<br>
>>>>>>>><br>
>>>>>>>> URL: <a href="https://github.com/llvm/llvm-project/commit/db008af501534d4590542253ae3acf783986f5f7" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/db008af501534d4590542253ae3acf783986f5f7</a><br>
>>>>>>>> DIFF: <a href="https://github.com/llvm/llvm-project/commit/db008af501534d4590542253ae3acf783986f5f7.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/db008af501534d4590542253ae3acf783986f5f7.diff</a><br>
>>>>>>>><br>
>>>>>>>> LOG: [llvm] Repair the modules build with C++17<br>
>>>>>>>><br>
>>>>>>>> I'm honestly not sure if this is a legitimate issue or not, but after<br>
>>>>>>>> switching from C++14 to C++17, the modules build started confusing<br>
>>>>>>>> arrays and initializer lists. Work around the issue by being explicit.<br>
>>>>>>>><br>
>>>>>>>> Added:<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>> Modified:<br>
>>>>>>>>      llvm/include/llvm/ADT/STLExtras.h<br>
>>>>>>>>      llvm/include/llvm/Support/FormatProviders.h<br>
>>>>>>>><br>
>>>>>>>> Removed:<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>> ################################################################################<br>
>>>>>>>> diff  --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h<br>
>>>>>>>> index 8e18b6a95aac0..c56ca97856c2b 100644<br>
>>>>>>>> --- a/llvm/include/llvm/ADT/STLExtras.h<br>
>>>>>>>> +++ b/llvm/include/llvm/ADT/STLExtras.h<br>
>>>>>>>> @@ -725,8 +725,8 @@ class zip_shortest : public zip_common<zip_shortest<Iters...>, Iters...> {<br>
>>>>>>>>     template <size_t... Ns><br>
>>>>>>>>     bool test(const zip_shortest<Iters...> &other,<br>
>>>>>>>>               std::index_sequence<Ns...>) const {<br>
>>>>>>>> -    return all_of(std::initializer_list<bool>{std::get<Ns>(this->iterators) !=<br>
>>>>>>>> -                                              std::get<Ns>(other.iterators)...},<br>
>>>>>>>> +    return all_of(std::array{std::get<Ns>(this->iterators) !=<br>
>>>>>>>> +                             std::get<Ns>(other.iterators)...},<br>
>>>>>>>>                     identity<bool>{});<br>
>>>>>>>>     }<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>> diff  --git a/llvm/include/llvm/Support/FormatProviders.h b/llvm/include/llvm/Support/FormatProviders.h<br>
>>>>>>>> index 8101ed7968adb..7cfce29b134fc 100644<br>
>>>>>>>> --- a/llvm/include/llvm/Support/FormatProviders.h<br>
>>>>>>>> +++ b/llvm/include/llvm/Support/FormatProviders.h<br>
>>>>>>>> @@ -21,8 +21,8 @@<br>
>>>>>>>>   #include "llvm/Support/FormatVariadicDetails.h"<br>
>>>>>>>>   #include "llvm/Support/NativeFormatting.h"<br>
>>>>>>>><br>
>>>>>>>> +#include <array><br>
>>>>>>>>   #include <type_traits><br>
>>>>>>>> -#include <vector><br>
>>>>>>>><br>
>>>>>>>>   namespace llvm {<br>
>>>>>>>>   namespace detail {<br>
>>>>>>>> @@ -369,7 +369,7 @@ template <typename IterT> class format_provider<llvm::iterator_range<IterT>> {<br>
>>>>>>>>         return Default;<br>
>>>>>>>>       }<br>
>>>>>>>><br>
>>>>>>>> -    for (const char *D : {"[]", "<>", "()"}) {<br>
>>>>>>>> +    for (const char *D : std::array{"[]", "<>", "()"}) {<br>
>>>>>>>>         if (Style.front() != D[0])<br>
>>>>>>>>           continue;<br>
>>>>>>>>         size_t End = Style.find_first_of(D[1]);<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>> _______________________________________________<br>
>>>>>>>> llvm-commits mailing list<br>
>>>>>>>> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
>>>>>>>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>