[clang] dc46fa4 - [NFCI] Fix set-but-unused warning in ExprConstant.cpp

Dávid Bolvanský via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 23:48:00 PDT 2022


Author: Dávid Bolvanský
Date: 2022-03-24T07:47:50+01:00
New Revision: dc46fa41d46e3cace9dbdc0b2c7b61d206b03165

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

LOG: [NFCI] Fix set-but-unused warning in ExprConstant.cpp

Added: 
    

Modified: 
    clang/lib/AST/ExprConstant.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 78f7592471ddb..0930bfd3fc8b9 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -10102,7 +10102,6 @@ bool RecordExprEvaluator::VisitLambdaExpr(const LambdaExpr *E) {
   // Iterate through all the lambda's closure object's fields and initialize
   // them.
   auto *CaptureInitIt = E->capture_init_begin();
-  const LambdaCapture *CaptureIt = ClosureClass->captures_begin();
   bool Success = true;
   const ASTRecordLayout &Layout = Info.Ctx.getASTRecordLayout(ClosureClass);
   for (const auto *Field : ClosureClass->fields()) {
@@ -10126,7 +10125,6 @@ bool RecordExprEvaluator::VisitLambdaExpr(const LambdaExpr *E) {
         return false;
       Success = false;
     }
-    ++CaptureIt;
   }
   return Success;
 }


        


More information about the cfe-commits mailing list