From dc5796cb3e77feb58928f84632d3f0088351d847 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 12 Jul 2012 00:45:08 +0000 Subject: [PATCH] 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 --- lib/AST/CommentSema.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.40.0