Author: Podchishchaeva, Mariya Date: 2023-07-24T05:15:50-07:00 New Revision: cc928c683058b2e43d250234066609008aa02f68
URL: https://github.com/llvm/llvm-project/commit/cc928c683058b2e43d250234066609008aa02f68 DIFF: https://github.com/llvm/llvm-project/commit/cc928c683058b2e43d250234066609008aa02f68.diff LOG: [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 Added: Modified: clang/lib/CodeGen/CGStmtOpenMP.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 7721feccb46ee2..4910ff6865e43d 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<OMPLoopBasedDirective>(S)) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits