Author: CHANDRA GHALE
Date: 2025-03-21T17:41:55+05:30
New Revision: ff8a960ab1e3525ed23a9296a0ac89ff75d5bf08

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

LOG: Minor unused variable error for sanitizer builds (#132372)

Fix #132371
Minor error ,  sanitizer builds are failing for unused variable.  

sanitizer-aarch64-linux/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:11764:17:
error: unused variable 'I' [-Werror,-Wunused-variable]
 11764 |   for (unsigned I : llvm::seq<unsigned>(NumFlags))

This was modified as part of
[https://github.com/llvm/llvm-project/pull/129938](https://github.com/llvm/llvm-project/pull/129938)
, which got missed.

Co-authored-by: Chandra Ghale <gh...@pe31.hpc.amslabs.hpecorp.net>

Added: 
    

Modified: 
    clang/lib/Serialization/ASTReader.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Serialization/ASTReader.cpp 
b/clang/lib/Serialization/ASTReader.cpp
index 930134bcd6501..c66ea5a2c0346 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -11761,7 +11761,7 @@ void 
OMPClauseReader::VisitOMPReductionClause(OMPReductionClause *C) {
   unsigned NumFlags = Record.readInt();
   SmallVector<bool, 16> Flags;
   Flags.reserve(NumFlags);
-  for (unsigned I : llvm::seq<unsigned>(NumFlags))
+  for ([[maybe_unused]] unsigned I : llvm::seq<unsigned>(NumFlags))
     Flags.push_back(Record.readInt());
   C->setPrivateVariableReductionFlags(Flags);
 }


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to