[flang-commits] [flang] 911e5aa - [flang][NFC] fix build warning about unused argument (#164776)
via flang-commits
flang-commits at lists.llvm.org
Thu Oct 23 05:07:23 PDT 2025
Author: jeanPerier
Date: 2025-10-23T14:07:19+02:00
New Revision: 911e5aa5cceda96dfcf578baae41e5452ff2ef11
URL: https://github.com/llvm/llvm-project/commit/911e5aa5cceda96dfcf578baae41e5452ff2ef11
DIFF: https://github.com/llvm/llvm-project/commit/911e5aa5cceda96dfcf578baae41e5452ff2ef11.diff
LOG: [flang][NFC] fix build warning about unused argument (#164776)
Fix warning about unused arguments. Just use [[maybe_unsued]] to deal with
the fact that these arguments are not always used because of the `if constexpr`.
Added:
Modified:
flang/lib/Lower/OpenACC.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp
index 1fc59c702fd81..d7861ac6463c8 100644
--- a/flang/lib/Lower/OpenACC.cpp
+++ b/flang/lib/Lower/OpenACC.cpp
@@ -816,8 +816,9 @@ static void genDeclareDataOperandOperations(
Fortran::semantics::FindCommonBlockContaining(symbol)) {
emitCommonGlobal(
converter, builder, accObject, dataClause,
- [&](mlir::OpBuilder &modBuilder, mlir::Location loc,
- fir::GlobalOp globalOp, mlir::acc::DataClause clause,
+ [&](mlir::OpBuilder &modBuilder, [[maybe_unused]] mlir::Location loc,
+ [[maybe_unused]] fir::GlobalOp globalOp,
+ [[maybe_unused]] mlir::acc::DataClause clause,
std::stringstream &asFortranStr, const std::string &ctorName) {
if constexpr (std::is_same_v<EntryOp, mlir::acc::DeclareLinkOp>) {
createDeclareGlobalOp<
More information about the flang-commits
mailing list