<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 9, 2014 at 2:29 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If we're going to back out the revert, can we put the code into an<br>
#ifdef so that the reserved namespace identifier is protected when<br>
compiling with something that doesn't understand lsan? Then we can<br>
argue over the "right" way with some protection.</blockquote><div><br></div><div>I'm not opposed to that, if we have a suitable predefine. But we already have *loads* of code in Clang that defines identifiers in the reserved namespace (try grepping for '[A-Za-z]__[A-Za-z]' in include/ to find a bunch of them), and none of our supported C++ implementations (for clang 3.5) have a problem with this, so I don't see that there's a lot of value in doing so.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
On Thu, Jan 9, 2014 at 5:07 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
> Please back out this revert. We are far from achieving consensus on this<br>
> revert being appropriate.<br>
><br>
><br>
> On Thu, Jan 9, 2014 at 11:43 AM, Alp Toker <<a href="mailto:alp@nuanti.com">alp@nuanti.com</a>> wrote:<br>
>><br>
>> Author: alp<br>
>> Date: Thu Jan  9 13:43:17 2014<br>
>> New Revision: 198885<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=198885&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=198885&view=rev</a><br>
>> Log:<br>
>> Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"<br>
>><br>
>> To declare or define reserved identifers is undefined behaviour in<br>
>> standard<br>
>> C++. This needs to be addressed in compiler-rt before it can be used in<br>
>> LLVM.<br>
>><br>
>> See the list discussion for details.<br>
>><br>
>> This reverts commit r198858.<br>
>><br>
>> Modified:<br>
>>     cfe/trunk/utils/TableGen/TableGen.cpp<br>
>><br>
>> Modified: cfe/trunk/utils/TableGen/TableGen.cpp<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/TableGen.cpp?rev=198885&r1=198884&r2=198885&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/TableGen.cpp?rev=198885&r1=198884&r2=198885&view=diff</a><br>

>><br>
>> ==============================================================================<br>
>> --- cfe/trunk/utils/TableGen/TableGen.cpp (original)<br>
>> +++ cfe/trunk/utils/TableGen/TableGen.cpp Thu Jan  9 13:43:17 2014<br>
>> @@ -263,10 +263,3 @@ int main(int argc, char **argv) {<br>
>><br>
>>    return TableGenMain(argv[0], &ClangTableGenMain);<br>
>>  }<br>
>> -<br>
>> -extern "C" {<br>
>> -// Disable LeakSanitizer for this binary as it has too many leaks that<br>
>> are not<br>
>> -// very interesting to fix. __lsan_is_turned_off is explained in<br>
>> -// compiler-rt/include/sanitizer/lsan_interface.h<br>
>> -int __lsan_is_turned_off() { return 1; }<br>
>> -}  // extern "C"<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>
><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>
><br>
</div></div></blockquote></div></div></div>