aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM aside from some nits, thank you for this! ================ Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:89-91 + AdditionalMatcher = cxxMethodDecl(ofClass(cxxRecordDecl( + has(fieldDecl(anyOf(hasType(pointerType()), hasType(SmartPointerType), + hasType(arrayType()))))))); ---------------- 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)`. ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-self-assignment.rst:6 +`cert-oop54-cpp` redirects here as an alias for this check. For the cert alias +WarnOnlyIfThisHasSuspiciousField option is set to `0`. ---------------- cert alias -> CERT alias, the ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-self-assignment.rst:7 +`cert-oop54-cpp` redirects here as an alias for this check. For the cert alias +WarnOnlyIfThisHasSuspiciousField option is set to `0`. + ---------------- Add backticks around the option name. ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-self-assignment.rst:124 + When non-zero, the check will warn only if the container class of the copy assignment operator + has any suspicious field (pointer or C array). This option is set to `1` by default. ---------------- field -> fields Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62192/new/ https://reviews.llvm.org/D62192 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits