From cc928c683058b2e43d250234066609008aa02f68 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Mon, 24 Jul 2023 05:15:40 -0700 Subject: [PATCH] [NFC][clang] Fix static analyzer concerns OMPTransformDirectiveScopeRAII doesn't have user-written copy constructor/assignment operator but it frees memory in the destructor. Delete these members since doesn't seem that OMPTransformDirectiveScopeRAII objects are intended for copy. Reviewed By: tahonermann, ABataev Differential Revision: https://reviews.llvm.org/D155849 --- clang/lib/CodeGen/CGStmtOpenMP.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 7721fec..4910ff6 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -1820,6 +1820,11 @@ class OMPTransformDirectiveScopeRAII { CodeGenFunction::CGCapturedStmtInfo *CGSI = nullptr; CodeGenFunction::CGCapturedStmtRAII *CapInfoRAII = nullptr; + OMPTransformDirectiveScopeRAII(const OMPTransformDirectiveScopeRAII &) = + delete; + OMPTransformDirectiveScopeRAII & + operator=(const OMPTransformDirectiveScopeRAII &) = delete; + public: OMPTransformDirectiveScopeRAII(CodeGenFunction &CGF, const Stmt *S) { if (const auto *Dir = dyn_cast(S)) { -- 2.7.4