aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPodchishchaeva, Mariya <mariya.podchishchaeva@intel.com>2023-07-25 02:32:16 -0700
committerPodchishchaeva, Mariya <mariya.podchishchaeva@intel.com>2023-07-25 02:43:41 -0700
commitc5a13e2c7e4c1769831c99ff2bf9f3690328c3d4 (patch)
tree8f5483f21221a5398b075994dd3a7eb25fb4cfcf
parent4dbe2db02d03ffee27feb43a6ef332ca6a3cbca2 (diff)
downloadllvm-c5a13e2c7e4c1769831c99ff2bf9f3690328c3d4.zip
llvm-c5a13e2c7e4c1769831c99ff2bf9f3690328c3d4.tar.gz
llvm-c5a13e2c7e4c1769831c99ff2bf9f3690328c3d4.tar.bz2
[NFC][clang] Fix static analyzer concerns
EHScopeStack doesn't seem to be intended for copy. It frees memory in the destructor and doesn't have user-written copy c'tor and assignment operator, so delete them to avoid using default ones which would do wrong. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D156133
-rw-r--r--clang/lib/CodeGen/EHScopeStack.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/EHScopeStack.h b/clang/lib/CodeGen/EHScopeStack.h
index 4893689..3c8a515 100644
--- a/clang/lib/CodeGen/EHScopeStack.h
+++ b/clang/lib/CodeGen/EHScopeStack.h
@@ -278,6 +278,9 @@ public:
CGF(nullptr) {}
~EHScopeStack() { delete[] StartOfBuffer; }
+ EHScopeStack(const EHScopeStack &) = delete;
+ EHScopeStack &operator=(const EHScopeStack &) = delete;
+
/// Push a lazily-created cleanup on the stack.
template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
static_assert(alignof(T) <= ScopeStackAlignment,