diff --git a/flang/lib/Lower/DirectivesCommon.h b/flang/lib/Lower/DirectivesCommon.h index 5b8d1f2359c5bb..24cb7c2fcf7db8 100644 --- a/flang/lib/Lower/DirectivesCommon.h +++ b/flang/lib/Lower/DirectivesCommon.h @@ -137,7 +137,8 @@ static inline void genOmpAtomicHintAndMemoryOrderClauses( } template -static void processOmpAtomicTODO(mlir::Type elementType, mlir::Location loc) { +static void processOmpAtomicTODO(mlir::Type elementType, + [[maybe_unused]] mlir::Location loc) { if (!elementType) return; if constexpr (std::is_same