Added WarnOnlyIfThisHasSuspiciousField option to allow
to catch any copy assignment operator independently from
the container class's fields.
Added the cert alias using this option.
Details
Details
- Reviewers
aaron.ballman - Commits
- rGdab31924e9c7: [clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment
rL361550: [clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment
rCTE361550: [clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment
Diff Detail
Diff Detail
- Repository
- rCTE Clang Tools Extra
Event Timeline
Comment Actions
LGTM aside from some nits, thank you for this!
clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp | ||
---|---|---|
89–91 ↗ | (On Diff #200479) | Nothing to be changed here, but it sure would be nice to have a clang-tidy-specific matcher to be used for option handling so we could do this modification using something like unless(!WarnOnlyIfThisHasSuspiciousField). |
clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-self-assignment.rst | ||
6 ↗ | (On Diff #200479) | cert alias -> CERT alias, the |
7 ↗ | (On Diff #200479) | Add backticks around the option name. |
124 ↗ | (On Diff #200479) | field -> fields |