diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h index b29b2bb1b9b52..d4035d14ab746 100644 --- a/mlir/include/mlir/IR/OperationSupport.h +++ b/mlir/include/mlir/IR/OperationSupport.h @@ -997,21 +997,13 @@ struct OperationState { if (!properties) { T *p = new T{}; properties = p; -#if defined(__clang__) && __has_warning("-Wdangling-assignment-gsl") -#pragma clang diagnostic push -// https://github.com/llvm/llvm-project/issues/126600 -#pragma clang diagnostic ignored "-Wdangling-assignment-gsl" -#endif propertiesDeleter = [](OpaqueProperties prop) { delete prop.as(); }; - propertiesSetter = [](OpaqueProperties newProp, + propertiesSetter = [](OpaqueProperties new_prop, const OpaqueProperties prop) { - *newProp.as() = *prop.as(); + *new_prop.as() = *prop.as(); }; -#if defined(__clang__) && __has_warning("-Wdangling-assignment-gsl") -#pragma clang diagnostic pop -#endif propertiesId = TypeID::get(); } assert(propertiesId == TypeID::get() && "Inconsistent properties");