Use mapAnyOf() and matchers based on it. Use of binaryOperation() means that modernize-loop-convert and readability-container-size-empty can now be used with rewritten binary operators.
Details
- Reviewers
aaron.ballman njames93 - Commits
- rGc0199b2a2170: [clang-tidy] Use new mapping matchers
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Theres a few compile errors here in the pre merge. Is this patch based against trunk or some local branch?
clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp | ||
---|---|---|
313 | This doesn't compile and it appears unrelated. Same beloe | |
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp | ||
32–33 | Any reason for clang not finding this? |
It's a patch series but for some reason Phab isn't aware of that, hence the lint errors and seemingly odd use of things not already landed.
LGTM
Can you either update the description of this patch to include the binaryOperation changes, or remove those changes from here.
clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.cpp | ||
---|---|---|
62–64 | While were here, this allOf matcher could be removed. | |
clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp | ||
43–46 | nit: Can this unrelated change be removed from this patch. | |
clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp | ||
313 | nit: ditto. | |
clang-tools-extra/clang-tidy/cert/MutatingCopyCheck.cpp | ||
33–35 | And here. | |
42 | Here. | |
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp | ||
214–217 | Also unrelated. | |
clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp | ||
186–190 | Also unrelated. | |
clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp | ||
51–55 | Unrelated changes again. | |
clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp | ||
75 | Unrelated change. | |
181–187 | Unrelated change | |
clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp | ||
69 | Unrelated change. |
While were here, this allOf matcher could be removed.