[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 16 12:08:00 PDT 2018
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`?
Just pass it alongside with the googletest include paths so to speak.
> (& likely would suppress the warning in headers
> only included in test code - so for example, in a header-only library if
> the user ran their tests they wouldn't see the warning, but when the users
> code was used in some other production code it might warn (& possibly break
> the build if -Werror is in use))
Could you please explain how it is not an issue if this would be a `-Wno-self-assign-overloaded`?
Repository:
rC Clang
https://reviews.llvm.org/D45685
More information about the cfe-commits
mailing list