<div dir="ltr">I'm not sure this is a practical direction to pursue - though perhaps others disagree.<br><br>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))<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 16, 2018 at 8:10 AM Roman Lebedev via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.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 updated this revision to Diff 142636.<br>
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.".<br>
lebedev.ri edited the summary of this revision.<br>
lebedev.ri added a comment.<br>
<br>
Actually make it `-wtest` (all lowercase).<br>
<br>
<br>
Repository:<br>
  rC Clang<br>
<br>
<a href="https://reviews.llvm.org/D45685" rel="noreferrer" target="_blank">https://reviews.llvm.org/D45685</a><br>
<br>
Files:<br>
  docs/ReleaseNotes.rst<br>
  docs/UsersManual.rst<br>
  include/clang/AST/ASTDiagnostic.h<br>
  include/clang/AST/CommentDiagnostic.h<br>
  include/clang/Basic/Diagnostic.h<br>
  include/clang/Basic/Diagnostic.td<br>
  include/clang/Basic/DiagnosticIDs.h<br>
  include/clang/Basic/DiagnosticOptions.def<br>
  include/clang/Basic/DiagnosticSemaKinds.td<br>
  include/clang/CrossTU/CrossTUDiagnostic.h<br>
  include/clang/Driver/DriverDiagnostic.h<br>
  include/clang/Driver/Options.td<br>
  include/clang/Frontend/FrontendDiagnostic.h<br>
  include/clang/Lex/LexDiagnostic.h<br>
  include/clang/Parse/ParseDiagnostic.h<br>
  include/clang/Sema/SemaDiagnostic.h<br>
  include/clang/Serialization/SerializationDiagnostic.h<br>
  include/clang/Tooling/Refactoring/RefactoringDiagnostic.h<br>
  lib/Basic/DiagnosticIDs.cpp<br>
  lib/Basic/Warnings.cpp<br>
  lib/Driver/Driver.cpp<br>
  lib/Frontend/CompilerInvocation.cpp<br>
  lib/Sema/SemaExpr.cpp<br>
  test/Sema/warn-self-assign-builtin-warn-test.c<br>
  test/SemaCXX/warn-self-assign-builtin-warn-test.cpp<br>
  test/SemaCXX/warn-self-assign-field-builtin-warn-test.cpp<br>
  test/SemaCXX/warn-self-assign-field-overloaded-warn-test.cpp<br>
  test/SemaCXX/warn-self-assign-overloaded-warn-test.cpp<br>
  tools/diagtool/DiagnosticNames.cpp<br>
  utils/TableGen/ClangDiagnosticsEmitter.cpp<br>
<br>
</blockquote></div></div>