aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/HLSLExternalSemaSource.cpp
diff options
context:
space:
mode:
authorMariya Podchishchaeva <mariya.podchishchaeva@intel.com>2024-12-17 14:37:48 +0100
committerGitHub <noreply@github.com>2024-12-17 14:37:48 +0100
commitfbbf1bed746c335b970aee7bd135676e534ffa05 (patch)
treead6a05103248e8c5dbc0b374270f04b9f1f83377 /clang/lib/Sema/HLSLExternalSemaSource.cpp
parentf1763888bb96c9c4069d8d069083371965561111 (diff)
downloadllvm-fbbf1bed746c335b970aee7bd135676e534ffa05.zip
llvm-fbbf1bed746c335b970aee7bd135676e534ffa05.tar.gz
llvm-fbbf1bed746c335b970aee7bd135676e534ffa05.tar.bz2
[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.
Diffstat (limited to 'clang/lib/Sema/HLSLExternalSemaSource.cpp')
-rw-r--r--clang/lib/Sema/HLSLExternalSemaSource.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/HLSLExternalSemaSource.cpp b/clang/lib/Sema/HLSLExternalSemaSource.cpp
index 09fced1..f3362fb 100644
--- a/clang/lib/Sema/HLSLExternalSemaSource.cpp
+++ b/clang/lib/Sema/HLSLExternalSemaSource.cpp
@@ -559,6 +559,10 @@ private:
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.