This is an archive of the discontinued LLVM Phabricator instance.

added clear check functionality
AbandonedPublic

Authored by abrahamcd on Jun 22 2022, 11:49 AM.

Details

Reviewers
None

Diff Detail

Event Timeline

abrahamcd created this revision.Jun 22 2022, 11:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2022, 11:49 AM
abrahamcd requested review of this revision.Jun 22 2022, 11:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2022, 11:49 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
cjdb added a subscriber: cjdb.Jun 22 2022, 12:08 PM

A great start, thanks! I understand this CL to have been sent out a few minutes in advance, so as a note to other reviewers: maybe check back in in ~20 minutes please?

clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp
52–55

Note to other reviewers: I suggested this because we couldn't work out a better way to identify if .clear() exists (Abraham can best expand on the issues regarding how a matcher wasn't working).

75–78

It looks as though this is unconditionally suggesting clear (even if it doesn't exist), and doesn't suggest it in the message.

clang-tools-extra/test/clang-tidy/checkers/bugprone-standalone-empty.cpp
5–9

Please remove clear from vector, and add vector_with_clear. We need to make sure that this works both when clear is absent and present.

16–21

As above. Please also rename absl::vector to something like absl::string (and drop the template altogether).

abrahamcd abandoned this revision.Jun 22 2022, 1:53 PM