From: NAKAMURA Takumi Date: Thu, 12 Jul 2012 00:45:08 +0000 (+0000) Subject: AST/CommentSema.cpp: Fix signess in abs() to appease msvc. It would not make sense... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc5796cb3e77feb58928f84632d3f0088351d847;p=clang AST/CommentSema.cpp: Fix signess in abs() to appease msvc. It would not make sense to pass (unsigned)-(unsigned) to abs(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160097 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp index 72b0af3436..ae13fa285a 100644 --- a/lib/AST/CommentSema.cpp +++ b/lib/AST/CommentSema.cpp @@ -390,7 +390,8 @@ unsigned Sema::correctTypoInParmVarReference( const IdentifierInfo *II = ParamVars[i]->getIdentifier(); if (II) { StringRef Name = II->getName(); - unsigned MinPossibleEditDistance = abs(Name.size() - Typo.size()); + unsigned MinPossibleEditDistance = + abs((int)Name.size() - (int)Typo.size()); if (MinPossibleEditDistance > 0 && Typo.size() / MinPossibleEditDistance < 3) continue;