<div dir="ltr">Does a ::abs(int) overload always exist, or should this be std::abs?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 1, 2014 at 3:23 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dblaikie<br>
Date: Thu May  1 17:23:56 2014<br>
New Revision: 207806<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=207806&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=207806&view=rev</a><br>
Log:<br>
Fix some -Wabsolute-value warnings introduced in r207796.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaOverload.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=207806&r1=207805&r2=207806&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=207806&r1=207805&r2=207806&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Thu May  1 17:23:56 2014<br>
@@ -9260,8 +9260,8 @@ struct CompareOverloadCandidatesForDispl<br>
           L->FailureKind == ovl_fail_too_few_arguments) {<br>
         if (R->FailureKind == ovl_fail_too_many_arguments ||<br>
             R->FailureKind == ovl_fail_too_few_arguments) {<br>
-          int LDist = abs(L->Function->getNumParams() - NumArgs);<br>
-          int RDist = abs(R->Function->getNumParams() - NumArgs);<br>
+          int LDist = abs((int)L->Function->getNumParams() - (int)NumArgs);<br>
+          int RDist = abs((int)R->Function->getNumParams() - (int)NumArgs);<br>
           if (LDist == RDist)<br>
             return L->FailureKind == ovl_fail_too_many_arguments &&<br>
                    R->FailureKind == ovl_fail_too_few_arguments;<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">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>
</blockquote></div><br></div>