<div dir="ltr">Oh! So if I'm not misstaken this is already fixed? If so you might be the right person to handle the bug report?<div><br></div><div>Br. Mattias</div></div><br><div class="gmail_quote"><div dir="ltr">Den ons 5 sep. 2018 kl 11:07 skrev Xing GUO <<a href="mailto:higuoxing@gmail.com">higuoxing@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">yes, you could follow the linkĀ <a href="https://reviews.llvm.org/D47687" target="_blank">https://reviews.llvm.org/D47687</a><div dir="auto">I made this patch. You could see some comments about that</div><div dir="auto"><br></div><div dir="auto">Cheers</div><div dir="auto">Xing</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 5, 2018 4:49 PM, "Mattias Haile via cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="m_1674505632564333368quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">Hi,</font></div><div><font face="arial, helvetica, sans-serif">Im looking at an old minor bug for "Missing -Wparentheses warning" where clang do not warning for a missing parentheses in the case of "<span style="color:rgb(0,0,0);white-space:pre-wrap">assert(x && val == 4 || (!x && val == 5));" whereas GCC would complain about missing parentheses for </span><span style="color:rgb(0,0,0);white-space:pre-wrap">x && val == 4</span><span style="color:rgb(0,0,0);white-space:pre-wrap">.</span></font></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><font face="arial, helvetica, sans-serif"><a href="https://bugs.llvm.org/show_bug.cgi?id=18971" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=18971</a><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></font></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">The following comments are found in the code so it seems like a conscious decision.</span></font></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><font face="monospace, monospace">// Warn about arg1 || arg2 && arg3, as GCC 4.3+ does.</font></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><font face="monospace, monospace">// We don't warn for 'assert(a || b && "bad")' since this is safe.</font></span></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">And since we never warn on macros</font></div><div><pre class="m_1674505632564333368m_-8103528126464514775gmail-bz_comment_text" id="m_1674505632564333368m_-8103528126464514775gmail-comment_text_8" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)">if (Opc == BO_LOr && !OpLoc.isMacroID()/* Don't warn in macros. */)</pre></div><div><pre class="m_1674505632564333368m_-8103528126464514775gmail-bz_comment_text" id="m_1674505632564333368m_-8103528126464514775gmail-comment_text_8" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)"><pre class="m_1674505632564333368m_-8103528126464514775gmail-bz_comment_text" id="m_1674505632564333368m_-8103528126464514775gmail-comment_text_9" style="white-space:pre-wrap;width:50em"><font face="arial, helvetica, sans-serif">This will not warn either.<br></font></pre><pre class="m_1674505632564333368m_-8103528126464514775gmail-bz_comment_text" id="m_1674505632564333368m_-8103528126464514775gmail-comment_text_9" style="white-space:pre-wrap;width:50em">define bar(x) \
( \
(void) 0 \
)
bar(x && val == 4 || !x && val == 5);</pre></pre><pre class="m_1674505632564333368m_-8103528126464514775gmail-bz_comment_text" id="m_1674505632564333368m_-8103528126464514775gmail-comment_text_8" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">Not sure what to make of this bug. </font></pre></div><div><font face="arial, helvetica, sans-serif">Br. Mattias</font></div><div><pre class="m_1674505632564333368m_-8103528126464514775gmail-bz_comment_text" id="m_1674505632564333368m_-8103528126464514775gmail-comment_text_8" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">PS. I'm new at this so play nice :)</font></pre></div></div></div></div></div></div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" rel="noreferrer" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>
</blockquote></div>