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–65 | While were here, this allOf matcher could be removed. | |
clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp | ||
43–47 | 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 | ||
213–216 | Also unrelated. | |
clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp | ||
186–190 | Also unrelated. | |
clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp | ||
52–56 | Unrelated changes again. | |
clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp | ||
74–75 | Unrelated change. | |
182–188 | Unrelated change | |
clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp | ||
69–72 | Unrelated change. |
clang-tidy: error: use of undeclared identifier 'mapAnyOf' [clang-diagnostic-error]
not useful