From: Ted Kremenek Date: Mon, 6 Oct 2008 20:35:04 +0000 (+0000) Subject: Use "unsigned" instead of "int" for i to remove a "comparison between unsigned and... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15f613987a24198468a5a696adcca49f4e363ae3;p=clang Use "unsigned" instead of "int" for i to remove a "comparison between unsigned and signed" warning (potential integer overflow). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57201 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index d8f1b05be6..edc0a3db6f 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -564,7 +564,7 @@ void Sema::AddCXXDirectInitializerToDecl(DeclTy *Dcl, SourceLocation LParenLoc, // If there is no declaration, there was an error parsing it. Just ignore // the initializer. if (RealDecl == 0) { - for (int i=0; i != NumExprs; ++i) + for (unsigned i = 0; i != NumExprs; ++i) delete static_cast(ExprTys[i]); return; }