r207027 - Moved operator delete to public area to appease gcc and conform to C++ standard.
Abramo Bagnara
abramo.bagnara at bugseng.com
Wed Apr 23 14:28:18 PDT 2014
Author: abramo
Date: Wed Apr 23 16:28:18 2014
New Revision: 207027
URL: http://llvm.org/viewvc/llvm-project?rev=207027&view=rev
Log:
Moved operator delete to public area to appease gcc and conform to C++ standard.
Modified:
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h?rev=207027&r1=207026&r2=207027&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h Wed Apr 23 16:28:18 2014
@@ -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;
};
More information about the cfe-commits
mailing list