https://github.com/Fznamznon created 
https://github.com/llvm/llvm-project/pull/120090

Class BuiltinTypeMethodBuilder has a user-defined destructor so likely compiler 
generated special functions may behave incorrectly. Delete explicitly copy 
constructor and copy assignment operator to avoid potential errors.

>From e85b64f919dc3b9e9590f9f344fcb9c277761789 Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya" <mariya.podchishcha...@intel.com>
Date: Mon, 16 Dec 2024 06:29:17 -0800
Subject: [PATCH] [HLSL][NFC] Fix static analyzer concerns

Class BuiltinTypeMethodBuilder has a user-defined destructor so likely
compiler generated special functions may behave incorrectly. Delete
explicitly copy constructor and copy assignment operator to avoid
potential errors.
---
 clang/lib/Sema/HLSLExternalSemaSource.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clang/lib/Sema/HLSLExternalSemaSource.cpp 
b/clang/lib/Sema/HLSLExternalSemaSource.cpp
index 79fc2751b73812..f21069d7d64ee4 100644
--- a/clang/lib/Sema/HLSLExternalSemaSource.cpp
+++ b/clang/lib/Sema/HLSLExternalSemaSource.cpp
@@ -546,6 +546,9 @@ struct BuiltinTypeMethodBuilder {
 public:
   ~BuiltinTypeMethodBuilder() { finalizeMethod(); }
 
+  BuiltinTypeMethodBuilder(BuiltinTypeMethodBuilder &Other) = delete;
+  BuiltinTypeMethodBuilder &operator=(BuiltinTypeMethodBuilder &Other) = 
delete;
+
   Expr *getResourceHandleExpr() {
     // The first statement added to a method or access to 'this' creates the
     // declaration.

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to