]> granicus.if.org Git - clang/commitdiff
Fix some -Wabsolute-value warnings introduced in r207796.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 1 May 2014 22:23:56 +0000 (22:23 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 1 May 2014 22:23:56 +0000 (22:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207806 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index 0ae9b79f008080611b99488946aa46313109bf7b..665ea4093cf715bbbb0b09fe459883aff4d50c7d 100644 (file)
@@ -9260,8 +9260,8 @@ struct CompareOverloadCandidatesForDisplay {
           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;