<div dir="ltr">Are the initializer_list<>s in question temporary arguments? Maybe the warning is triggering because the ArrayRef will outlive the initializer_list<>.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2019 at 7:01 AM Erik Hogeman via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span></span>
<div><br>
</div>
Building LLVM with a newer GCC version seems to generate several compiler warnings, some of which look like false positives. For example, the '-Winit-list-lifetime' warning added in GCC9 triggers for one of the constructors for ArrayRef, the one taking an initializer_list.<br>
<div><br>
</div>
<div>How are false positive warnings dealt with in LLVM in general? It's of course possible to just ignore them or use compiler flags to disable them, but with that I think you would risk missing other actual meaningful warnings.</div>
<div>Would it make sense to add explicit diagnostic pragmas in the code for such cases, to only silence the warning where they are known to be false positives, or would such a patch be likely to face pushback during review?</div>
<div><br>
</div>
<div>I apologize if this question is already answered somewhere in the documentation, I tried looking there first but I could not find anything.<br>
</div>
<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Cheers,</div>
<div>Erik<br>
</div>
<span></span></div>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">-Brian</div>