[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`.
This commit is contained in:
jeanPerier
2025-10-23 14:07:19 +02:00
committed by GitHub
parent b11f0e1bcd
commit 911e5aa5cc

View File

@@ -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<