diff options
author | Podchishchaeva, Mariya <mariya.podchishchaeva@intel.com> | 2023-07-25 02:32:16 -0700 |
---|---|---|
committer | Podchishchaeva, Mariya <mariya.podchishchaeva@intel.com> | 2023-07-25 02:43:41 -0700 |
commit | c5a13e2c7e4c1769831c99ff2bf9f3690328c3d4 (patch) | |
tree | 8f5483f21221a5398b075994dd3a7eb25fb4cfcf | |
parent | 4dbe2db02d03ffee27feb43a6ef332ca6a3cbca2 (diff) | |
download | llvm-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.h | 3 |
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, |