[Mlir-commits] [mlir] 376f65d - Revert "[mlir] Silence -Wdangling-assignment-gsl in OperationSupport.h (#126140)"
Shoaib Meenai
llvmlistbot at llvm.org
Tue Feb 11 15:05:32 PST 2025
Author: Shoaib Meenai
Date: 2025-02-11T15:05:12-08:00
New Revision: 376f65d865282d32c12f47a3247968e16025d1ef
URL: https://github.com/llvm/llvm-project/commit/376f65d865282d32c12f47a3247968e16025d1ef
DIFF: https://github.com/llvm/llvm-project/commit/376f65d865282d32c12f47a3247968e16025d1ef.diff
LOG: Revert "[mlir] Silence -Wdangling-assignment-gsl in OperationSupport.h (#126140)"
This reverts commit f6556afce0aa5a72ef42103875101d975e810474.
Buildbots are broken.
Added:
Modified:
mlir/include/mlir/IR/OperationSupport.h
Removed:
################################################################################
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<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");
More information about the Mlir-commits
mailing list