[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 06:38:32 PDT 2018
lebedev.ri created this revision.
lebedev.ri added reviewers: rjmccall, aaron.ballman, dblaikie, thakis, rsmith, chandlerc, brooksmoses.
Herald added a subscriber: klimek.
Credit for the idea goes to @rjmccall.
I'm not quite sure how to do it with `-wtest` (lowercase). so i just modelled it after `-Wsystem-headers`.
As tests show, only the overloaded non-field assign is silenced by it.
Testing: `$ ninja check-clang-sema check-clang-semacxx check-clang`
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/DiagnosticSemaKinds.td
include/clang/CrossTU/CrossTUDiagnostic.h
include/clang/Driver/DriverDiagnostic.h
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/Sema/SemaExpr.cpp
test/Sema/warn-self-assign-builtin-warn-tests.c
test/SemaCXX/warn-self-assign-builtin-warn-tests.cpp
test/SemaCXX/warn-self-assign-field-builtin-warn-tests.cpp
test/SemaCXX/warn-self-assign-field-overloaded-warn-tests.cpp
test/SemaCXX/warn-self-assign-overloaded-warn-tests.cpp
tools/diagtool/DiagnosticNames.cpp
utils/TableGen/ClangDiagnosticsEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45685.142625.patch
Type: text/x-patch
Size: 21514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180416/18f54b5d/attachment-0001.bin>
More information about the cfe-commits
mailing list