Skip to content

Commit 376f65d

Browse files
committed
Revert "[mlir] Silence -Wdangling-assignment-gsl in OperationSupport.h (#126140)"
This reverts commit f6556af. Buildbots are broken.
1 parent 84fe1f6 commit 376f65d

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

mlir/include/mlir/IR/OperationSupport.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -997,21 +997,13 @@ struct OperationState {
997997
if (!properties) {
998998
T *p = new T{};
999999
properties = p;
1000-
#if defined(__clang__) && __has_warning("-Wdangling-assignment-gsl")
1001-
#pragma clang diagnostic push
1002-
// https://github.com/llvm/llvm-project/issues/126600
1003-
#pragma clang diagnostic ignored "-Wdangling-assignment-gsl"
1004-
#endif
10051000
propertiesDeleter = [](OpaqueProperties prop) {
10061001
delete prop.as<const T *>();
10071002
};
1008-
propertiesSetter = [](OpaqueProperties newProp,
1003+
propertiesSetter = [](OpaqueProperties new_prop,
10091004
const OpaqueProperties prop) {
1010-
*newProp.as<T *>() = *prop.as<const T *>();
1005+
*new_prop.as<T *>() = *prop.as<const T *>();
10111006
};
1012-
#if defined(__clang__) && __has_warning("-Wdangling-assignment-gsl")
1013-
#pragma clang diagnostic pop
1014-
#endif
10151007
propertiesId = TypeID::get<T>();
10161008
}
10171009
assert(propertiesId == TypeID::get<T>() && "Inconsistent properties");

0 commit comments

Comments
 (0)