[clang-tools-extra] 28728bf - Fix a signed/unsigned warning promoted to error.

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 17:49:51 PST 2020


Author: Eric Christopher
Date: 2020-02-18T17:49:22-08:00
New Revision: 28728bf06f556dc8be5bc1fa7712eeee9906ba68

URL: https://github.com/llvm/llvm-project/commit/28728bf06f556dc8be5bc1fa7712eeee9906ba68
DIFF: https://github.com/llvm/llvm-project/commit/28728bf06f556dc8be5bc1fa7712eeee9906ba68.diff

LOG: Fix a signed/unsigned warning promoted to error.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
index d365bbbe3c43..2938e2b9c7cd 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
@@ -86,7 +86,7 @@ static bool checkParamDeclOfAncestorCallExprHasRValueRefType(
   if (const clang::CallExpr *TheCallExpr =
           tryGetCallExprAncestorForCxxConstructExpr(TheCxxConstructExpr,
                                                     Context)) {
-    for (int i = 0; i < TheCallExpr->getNumArgs(); ++i) {
+    for (unsigned i = 0; i < TheCallExpr->getNumArgs(); ++i) {
       const Expr *Arg = TheCallExpr->getArg(i);
       if (Arg->getSourceRange() == TheCxxConstructExpr->getSourceRange()) {
         if (const auto *TheCallExprFuncProto =


        


More information about the cfe-commits mailing list