[clang] 6d31e7e - [NFC][Clang][HLSL] Minor fixes to SpirvOperand (#172782)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 29 14:25:19 PST 2025


Author: Shafik Yaghmour
Date: 2025-12-29T14:25:15-08:00
New Revision: 6d31e7e4f29e89213a55e9f5fdcd176396604637

URL: https://github.com/llvm/llvm-project/commit/6d31e7e4f29e89213a55e9f5fdcd176396604637
DIFF: https://github.com/llvm/llvm-project/commit/6d31e7e4f29e89213a55e9f5fdcd176396604637.diff

LOG: [NFC][Clang][HLSL] Minor fixes to SpirvOperand (#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.

Added: 
    

Modified: 
    clang/include/clang/AST/TypeBase.h

Removed: 
    


################################################################################
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 {


        


More information about the cfe-commits mailing list