Author: Mariya Podchishchaeva
Date: 2024-12-17T14:37:48+01:00
New Revision: fbbf1bed746c335b970aee7bd135676e534ffa05

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

LOG: [HLSL][NFC] Fix static analyzer concerns (#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.

Added: 
    

Modified: 
    clang/lib/Sema/HLSLExternalSemaSource.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/HLSLExternalSemaSource.cpp 
b/clang/lib/Sema/HLSLExternalSemaSource.cpp
index 09fced1115687b..f3362fb619afc1 100644
--- a/clang/lib/Sema/HLSLExternalSemaSource.cpp
+++ b/clang/lib/Sema/HLSLExternalSemaSource.cpp
@@ -559,6 +559,10 @@ struct BuiltinTypeMethodBuilder {
 public:
   ~BuiltinTypeMethodBuilder() { finalizeMethod(); }
 
+  BuiltinTypeMethodBuilder(const BuiltinTypeMethodBuilder &Other) = delete;
+  BuiltinTypeMethodBuilder &
+  operator=(const 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