[clang] Guard against self-assignment; NFC (PR #145743)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 11:21:50 PDT 2025
================
@@ -6410,9 +6410,11 @@ class SpirvOperand {
~SpirvOperand() {}
SpirvOperand &operator=(const SpirvOperand &Other) {
- this->Kind = Other.Kind;
- this->ResultType = Other.ResultType;
- this->Value = Other.Value;
+ if (this != &Other) {
----------------
AaronBallman wrote:
okay, that's worth a shot.
https://github.com/llvm/llvm-project/pull/145743
More information about the cfe-commits
mailing list