From: Abramo Bagnara Date: Wed, 23 Apr 2014 21:28:18 +0000 (+0000) Subject: Moved operator delete to public area to appease gcc and conform to C++ standard. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db32760555be90a72191d43a6a17fee0b47133ef;p=clang Moved operator delete to public area to appease gcc and conform to C++ standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207027 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h index 2928e9eca6..b5e2d526cc 100644 --- a/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ b/include/clang/Analysis/Analyses/ThreadSafetyTIL.h @@ -104,6 +104,12 @@ public: return ::operator new(S, R); } + // SExpr objects cannot be deleted. + // This declaration is public to avoid breaking gcc compilation + // with REQUIRES_EH=1. + // The access check is also mandated by C++11 5.3.4p17 and former standards. + void operator delete(void *) LLVM_DELETED_FUNCTION; + protected: SExpr(TIL_Opcode Op) : Opcode(Op), Reserved(0), Flags(0) {} SExpr(const SExpr &E) : Opcode(E.Opcode), Reserved(0), Flags(E.Flags) {} @@ -115,9 +121,8 @@ protected: private: SExpr() LLVM_DELETED_FUNCTION; - // SExpr objects must be created in an arena and cannot be deleted. + // SExpr objects must be created in an arena. void *operator new(size_t) LLVM_DELETED_FUNCTION; - void operator delete(void *) LLVM_DELETED_FUNCTION; };