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