<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 23, 2014 at 2:28 PM, Abramo Bagnara <span dir="ltr"><<a href="mailto:abramo.bagnara@bugseng.com" target="_blank">abramo.bagnara@bugseng.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: abramo<br>
Date: Wed Apr 23 16:28:18 2014<br>
New Revision: 207027<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=207027&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=207027&view=rev</a><br>
Log:<br>
Moved operator delete to public area to appease gcc and conform to C++ standard.<br>
<br>
Modified:<br>
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h<br>
<br>
Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h?rev=207027&r1=207026&r2=207027&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h?rev=207027&r1=207026&r2=207027&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h (original)<br>
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h Wed Apr 23 16:28:18 2014<br>
@@ -104,6 +104,12 @@ public:<br>
return ::operator new(S, R);<br>
}<br>
<br>
+ // SExpr objects cannot be deleted.<br>
+ // This declaration is public to avoid breaking gcc compilation<br>
+ // with REQUIRES_EH=1.<br>
+ // The access check is also mandated by C++11 5.3.4p17 and former standards.<br></blockquote><div><br></div><div>This comment is false. "the deallocation function" here is the one corresponding to the allocation function. Per p20, there is no deallocation function matching the allocation function we use here. This is simply public to work around a GCC bug.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ void operator delete(void *) LLVM_DELETED_FUNCTION;<br>
+<br>
protected:<br>
SExpr(TIL_Opcode Op) : Opcode(Op), Reserved(0), Flags(0) {}<br>
SExpr(const SExpr &E) : Opcode(E.Opcode), Reserved(0), Flags(E.Flags) {}<br>
@@ -115,9 +121,8 @@ protected:<br>
private:<br>
SExpr() LLVM_DELETED_FUNCTION;<br>
<br>
- // SExpr objects must be created in an arena and cannot be deleted.<br>
+ // SExpr objects must be created in an arena.<br>
void *operator new(size_t) LLVM_DELETED_FUNCTION;<br>
- void operator delete(void *) LLVM_DELETED_FUNCTION;<br>
};<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>