[clang] b809671 - [Serialization] Fix a warning

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 6 08:22:08 PDT 2024


Author: Kazu Hirata
Date: 2024-08-06T08:22:00-07:00
New Revision: b809671a4184fb279abf7ae2f75ee9117c13dd60

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

LOG: [Serialization] Fix a warning

This patch fixes:

  clang/lib/Serialization/ASTReader.cpp:11426:13: error: unused
  variable '_' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    clang/lib/Serialization/ASTReader.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index bca7f87540cc1..383b128145dce 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -11423,8 +11423,10 @@ void OMPClauseReader::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) {
   unsigned NumVars = C->varlist_size();
   SmallVector<Expr *, 16> Vars;
   Vars.reserve(NumVars);
-  for (auto _ : llvm::seq<unsigned>(NumVars))
+  for (auto _ : llvm::seq<unsigned>(NumVars)) {
+    (void)_;
     Vars.push_back(Record.readSubExpr());
+  }
   C->setVarRefs(Vars);
 }
 


        


More information about the cfe-commits mailing list