[clang] ac83582 - [Serialization] Fix a warning

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 10 09:21:08 PDT 2024


Author: Kazu Hirata
Date: 2024-08-10T09:21:02-07:00
New Revision: ac83582a2e7301f7088d14a4c352438e9f62bcf0

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

LOG: [Serialization] Fix a warning

This patch fixes:

  clang/lib/Serialization/ASTReader.cpp:11484: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 e1d554ee7db22..8ff7c82950dba 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -11481,8 +11481,10 @@ void OMPClauseReader::VisitOMPThreadLimitClause(OMPThreadLimitClause *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