<div dir="ltr">I don't think we've got any formal policy here - and some folks appear to be trying to preserve GCC warning cleanliness for the LLVM build (but I imagine that work lags new GCC releases, etc)<br><br>One more aggressive stance (which I kind of like): Disable any non-clang warning that has an unfavorable false positive (even if we lose the true positives) - improve Clang by adding any missing warnings if they're sufficiently valuable. (& if Clang warnings have false positives - fix those in clang rather than working around them in the codebase)<br><br>- Dave</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2019 at 5: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>