<div dir="ltr">I did not see that it was reapplied later, sorry.<br><br><div>With clang version 3.9.0 (tags/RELEASE_390/final) I get the warning in both c11 and c++11 mode.<br>With clang version 4.0.0 (trunk 290146) (llvm/trunk 290118) it's gone in c11 mode, but still there in c++11.<br>The piece of code I tested it on: <a href="https://gist.github.com/torokati44/37e6aca2d516cb7c3cb31b7ccf8a519e">https://gist.github.com/torokati44/37e6aca2d516cb7c3cb31b7ccf8a519e</a><br><br>In the part of the code affected by the patch, ED->getPromotionType() is BuiltinType 'int', and Type is EnumType 'enum E'.<div>For these two types, Context.typesAreCompatible returns true in c11 mode, but false in c++11 mode (regardless of which underlying type - or if any - is specified).<br>I presume this is the intended behavior. And if so, how could the example code be modified to make it warning-free in c++, while keeping the parameter an enum, and not making it a simple int?<br></div><br>Thank you,<br>Attila</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-19 18:36 GMT+01:00 Aaron Ballman <span dir="ltr"><<a href="mailto:aaron.ballman@gmail.com" target="_blank">aaron.ballman@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Dec 16, 2016 at 7:00 AM, Attila Török via Phabricator<br>
<<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br>
> torokati44 added a comment.<br>
><br>
> I see this has been reverted in r281612, but I can no longer access the build log serving as a reason linked in the message: <a href="https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg35386.html" rel="noreferrer" target="_blank">https://www.mail-archive.com/<wbr>cfe-commits@lists.llvm.org/<wbr>msg35386.html</a><br>
> We have a few false-positive warnings that (I think) would be silenced by this change. I'm just wondering if something like this, if not this, could be included anyway? Not critical of course, it just would be nice.<br>
<br>
</span>This patch was reapplied in r281632:<br>
<br>
<a href="http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160912/170772.html" rel="noreferrer" target="_blank">http://lists.llvm.org/<wbr>pipermail/cfe-commits/Week-of-<wbr>Mon-20160912/170772.html</a><br>
<br>
Do you still have false positives even with that applied?<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span></blockquote></div><br></div>