https://github.com/shafik created https://github.com/llvm/llvm-project/pull/172782
Static analysis flagged this as not applying rule of three properly. The code was trying to do the right thing but basically they are effectively all defaulted, so we make it explicit. >From 5b3e9e8be648adbbaceb02ec7a0957bd5f4f2ccb Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour <[email protected]> Date: Wed, 17 Dec 2025 19:03:49 -0800 Subject: [PATCH] [NFC][Clang][HLSL] Minor fixes to SpirvOperand Static analysis flagged this as not applying rule of three properly. The code was trying to do the right thing but basically they are effectively all defaulted, so we make it explicit. --- clang/include/clang/AST/TypeBase.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/AST/TypeBase.h b/clang/include/clang/AST/TypeBase.h index f546393f6d8c3..b0fdf178ab3cc 100644 --- a/clang/include/clang/AST/TypeBase.h +++ b/clang/include/clang/AST/TypeBase.h @@ -6797,9 +6797,8 @@ class SpirvOperand { SpirvOperand(SpirvOperandKind Kind, QualType ResultType, llvm::APInt Value) : Kind(Kind), ResultType(ResultType), Value(std::move(Value)) {} - SpirvOperand(const SpirvOperand &Other) { *this = Other; } - ~SpirvOperand() {} - + SpirvOperand(const SpirvOperand &Other) = default; + ~SpirvOperand() = default; SpirvOperand &operator=(const SpirvOperand &Other) = default; bool operator==(const SpirvOperand &Other) const { _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
