<div dir="ltr">On Thu, Oct 31, 2013 at 2:44 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">On Thu, Oct 31, 2013 at 10:35 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Looks pretty reasonable - but are these two separate code changes, or do they interrelate in some way? If they're separate changes that can have separate test cases, it'd be nice to commit them each in their on commit just for clarity.<br>

</div></blockquote><div><br></div></div><div>Yes, I can separate them into two pieces when I submit them. </div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">

<br>Have you considered/plan to look at non-type template parameters?<br><br>template<int Num><br>bool greater(unsigned Val) {<div>  return Val >= Num;<br>}<br><br>... greater<0>(42); ...<br><br>I'm not sure if this tickles the same kind of problem or not - but might be worth checking.</div>


</div><div class="gmail_extra"><br></div></blockquote></div><div>I haven't seen this case yet, but I would say it is good to include this test case too.   I think changing the check to an instantiation dependency check would allow it to catch this case as well.</div>
</div></div></div></blockquote><div><br></div><div>I spoke too soon.  The information about non-template types doesn't persist up the AST tree so it isn't as easily retrievable as the substituted template types.  For a simple case like your example, it would be simple to check for a substituted expression in the operand.  For a more complicated constant expression, an AST visitor would be needed, or the function that computes the constant value would need to pass this information back.  I'll stick with template types for now.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote"><div>On Wed, Oct 30, 2013 at 8:17 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>></span> wrote:<br>


</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr">This patch turns off the tautological compare warnings when one of the operands is a template parameter type.  There's not an easy way to correct the code or silence this warning so this way seemed to be the best solution.  Anyone have any thoughts on altering the behavior of this warning?</div>



<br></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div></div>