Skip to content

Commit

Permalink
Revert "[mlir] Silence -Wdangling-assignment-gsl in OperationSupport.h (
Browse files Browse the repository at this point in the history
llvm#126140)"

This reverts commit f6556af.

Buildbots are broken.
  • Loading branch information
smeenai authored and alejandro-alvarez-sonarsource committed Feb 12, 2025
1 parent 58d9660 commit d356c64
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions mlir/include/mlir/IR/OperationSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<const T *>();
};
propertiesSetter = [](OpaqueProperties newProp,
propertiesSetter = [](OpaqueProperties new_prop,
const OpaqueProperties prop) {
*newProp.as<T *>() = *prop.as<const T *>();
*new_prop.as<T *>() = *prop.as<const T *>();
};
#if defined(__clang__) && __has_warning("-Wdangling-assignment-gsl")
#pragma clang diagnostic pop
#endif
propertiesId = TypeID::get<T>();
}
assert(propertiesId == TypeID::get<T>() && "Inconsistent properties");
Expand Down

0 comments on commit d356c64

Please sign in to comment.