Skip to content

Commit 05f20fe

Browse files
jeanPerierLukacma
authored andcommitted
[flang][NFC] fix build warning about unused argument (llvm#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`.
1 parent e38ec46 commit 05f20fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flang/lib/Lower/OpenACC.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,9 @@ static void genDeclareDataOperandOperations(
816816
Fortran::semantics::FindCommonBlockContaining(symbol)) {
817817
emitCommonGlobal(
818818
converter, builder, accObject, dataClause,
819-
[&](mlir::OpBuilder &modBuilder, mlir::Location loc,
820-
fir::GlobalOp globalOp, mlir::acc::DataClause clause,
819+
[&](mlir::OpBuilder &modBuilder, [[maybe_unused]] mlir::Location loc,
820+
[[maybe_unused]] fir::GlobalOp globalOp,
821+
[[maybe_unused]] mlir::acc::DataClause clause,
821822
std::stringstream &asFortranStr, const std::string &ctorName) {
822823
if constexpr (std::is_same_v<EntryOp, mlir::acc::DeclareLinkOp>) {
823824
createDeclareGlobalOp<

0 commit comments

Comments
 (0)