<div dir="auto">+1 to just adding a dedicated Wno flag for the new warning instead of coming up with this new spelling.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 16, 2018, 3:41 PM Roman Lebedev via Phabricator via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">lebedev.ri added a comment.<br>
<br>
Uuuh, the fact that phab posts the top-postings, but silently ignores inline replies is annoying.<br>
<br>
>> lebedev.ri added a comment.<br>
>> <br>
>> In <a href="https://reviews.llvm.org/D45685#1069040" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D45685#1069040</a>, @dblaikie wrote:<br>
>> <br>
>>> I'm not sure this is a practical direction to pursue - though perhaps<br>
>>  >  others disagree.<br>
>> <br>
>>> It's likely non-trivial to plumb a flag through most build systems to be<br>
>>  >  applied only to test code<br>
>> <br>
>> I'm sorry, I don't understand.<br>
>> <br>
>> If you don't separate between source code and `*_test.cpp` sources, sure,<br>
>>  you will loose the warning coverage either way.<br>
>> <br>
>> What difference is there between passing `-wtest` and passing<br>
>>  `-Wno-self-assign-overloaded`?<br>
> <br>
> Not much, if any.<br>
<br>
Ok, so this was a non-argument then?<br>
<br>
>> Just pass it alongside with the googletest include paths so to speak.<br>
> <br>
> But build systems don't necessarily expose that kind of ability. (For<br>
>  example, googletest (not the only kind of test suite/code) is checked into<br>
>  the LLVM codebase like another library - so depending on it is just another<br>
>  library dependency, not a special "test" library dependency).<br>
<br>
It's a bit hard to talk about all and every spherical build system / project<br>
in the vacuum, because there is an infinite number of possibilities.<br>
Of course some build systems are horribly designed, and it will be hard to<br>
do that there. But I sure hope that isn't the case in most of the cases.<br>
It might be more productive to talk about a few good known realities.<br>
<br>
In llvm's case you would simply add `-wtest` (or `-Wno-self-assign-overloaded`)<br>
in here <a href="https://github.com/llvm-mirror/llvm/blob/2a6cf85828509e89e18739e5f4b9a958820d66d4/cmake/modules/AddLLVM.cmake#L1079-L1085" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm-mirror/llvm/blob/2a6cf85828509e89e18739e5f4b9a958820d66d4/cmake/modules/AddLLVM.cmake#L1079-L1085</a><br>
and around here <a href="https://github.com/llvm-mirror/libcxx/blob/73e00f8321b13559b3c41f6656686d980fe92fbe/utils/libcxx/test/config.py#L914" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm-mirror/libcxx/blob/73e00f8321b13559b3c41f6656686d980fe92fbe/utils/libcxx/test/config.py#L914</a><br>
I'd say that is rather trivial.<br>
<br>
<br>
Repository:<br>
  rC Clang<br>
<br>
<a href="https://reviews.llvm.org/D45685" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D45685</a><br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" rel="noreferrer">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>