Author: Podchishchaeva, Mariya Date: 2023-07-28T05:29:56-07:00 New Revision: a623f4c7849838361c9a69324cf669100bc0e414
URL: https://github.com/llvm/llvm-project/commit/a623f4c7849838361c9a69324cf669100bc0e414 DIFF: https://github.com/llvm/llvm-project/commit/a623f4c7849838361c9a69324cf669100bc0e414.diff LOG: [NFC][clang] Fix static analyzer concerns DelegatingDeserializationListener frees resources in the destructor but doesn't have user-written copy c'tor or assignment operator, so copying it using default ones can cause double free. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D156405 Added: Modified: clang/lib/Frontend/FrontendAction.cpp Removed: ################################################################################ diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index c6f958a6077bf6..f14557c316ec7a 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -61,6 +61,11 @@ class DelegatingDeserializationListener : public ASTDeserializationListener { delete Previous; } + DelegatingDeserializationListener(const DelegatingDeserializationListener &) = + delete; + DelegatingDeserializationListener & + operator=(const DelegatingDeserializationListener &) = delete; + void ReaderInitialized(ASTReader *Reader) override { if (Previous) Previous->ReaderInitialized(Reader); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits