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 (& 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)) On Mon, Apr 16, 2018 at 8:10 AM Roman Lebedev via Phabricator < revi...@reviews.llvm.org> wrote: > lebedev.ri updated this revision to Diff 142636. > lebedev.ri retitled this revision from "[Sema] Add -Wtest global flag that > silences -Wself-assign for overloaded operators." to "[Sema] Add -wtest > global flag that silences -Wself-assign for overloaded operators.". > lebedev.ri edited the summary of this revision. > lebedev.ri added a comment. > > Actually make it `-wtest` (all lowercase). > > > Repository: > rC Clang > > https://reviews.llvm.org/D45685 > > Files: > docs/ReleaseNotes.rst > docs/UsersManual.rst > include/clang/AST/ASTDiagnostic.h > include/clang/AST/CommentDiagnostic.h > include/clang/Basic/Diagnostic.h > include/clang/Basic/Diagnostic.td > include/clang/Basic/DiagnosticIDs.h > include/clang/Basic/DiagnosticOptions.def > include/clang/Basic/DiagnosticSemaKinds.td > include/clang/CrossTU/CrossTUDiagnostic.h > include/clang/Driver/DriverDiagnostic.h > include/clang/Driver/Options.td > include/clang/Frontend/FrontendDiagnostic.h > include/clang/Lex/LexDiagnostic.h > include/clang/Parse/ParseDiagnostic.h > include/clang/Sema/SemaDiagnostic.h > include/clang/Serialization/SerializationDiagnostic.h > include/clang/Tooling/Refactoring/RefactoringDiagnostic.h > lib/Basic/DiagnosticIDs.cpp > lib/Basic/Warnings.cpp > lib/Driver/Driver.cpp > lib/Frontend/CompilerInvocation.cpp > lib/Sema/SemaExpr.cpp > test/Sema/warn-self-assign-builtin-warn-test.c > test/SemaCXX/warn-self-assign-builtin-warn-test.cpp > test/SemaCXX/warn-self-assign-field-builtin-warn-test.cpp > test/SemaCXX/warn-self-assign-field-overloaded-warn-test.cpp > test/SemaCXX/warn-self-assign-overloaded-warn-test.cpp > tools/diagtool/DiagnosticNames.cpp > utils/TableGen/ClangDiagnosticsEmitter.cpp > >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits