r207806 - Fix some -Wabsolute-value warnings introduced in r207796.

David Blaikie dblaikie at gmail.com
Thu May 1 15:23:56 PDT 2014


Author: dblaikie
Date: Thu May  1 17:23:56 2014
New Revision: 207806

URL: http://llvm.org/viewvc/llvm-project?rev=207806&view=rev
Log:
Fix some -Wabsolute-value warnings introduced in r207796.

Modified:
    cfe/trunk/lib/Sema/SemaOverload.cpp

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=207806&r1=207805&r2=207806&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Thu May  1 17:23:56 2014
@@ -9260,8 +9260,8 @@ struct CompareOverloadCandidatesForDispl
           L->FailureKind == ovl_fail_too_few_arguments) {
         if (R->FailureKind == ovl_fail_too_many_arguments ||
             R->FailureKind == ovl_fail_too_few_arguments) {
-          int LDist = abs(L->Function->getNumParams() - NumArgs);
-          int RDist = abs(R->Function->getNumParams() - NumArgs);
+          int LDist = abs((int)L->Function->getNumParams() - (int)NumArgs);
+          int RDist = abs((int)R->Function->getNumParams() - (int)NumArgs);
           if (LDist == RDist)
             return L->FailureKind == ovl_fail_too_many_arguments &&
                    R->FailureKind == ovl_fail_too_few_arguments;





More information about the cfe-commits mailing list