There should be a follow up to this for changing the traversal mode, but some of the tests don't like that.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp | ||
---|---|---|
87 | A lot of this MR is removal of redundant expr() and qualType(), but mixed in with the diff is changes like those to SizeOfExpr below. This MR would be much easier to review if you broke out the removal of redundant matchers to its own MR (or just commit it as an NFC). That would leave behind the more-complex changes like things like SizeOfExpr. |
Comment Actions
LGTM, but I think you could split it into 3 commits with a commit message saying what each is doing. "Simplify a lot of" doesn't say anything specific about what this patch does. It looks like you could split it into
- "Remove obsolete expr()" (because of the ones in hasLHS and hasRHS)
- "Simplify anyOf(integerLiteral()...) to integerLiteral(anyOf())"
- "Use hasArgumentOfType matcher with sizeOfExpr"
I'm not sure if this patch does anything else than those 3.
A lot of this MR is removal of redundant expr() and qualType(), but mixed in with the diff is changes like those to SizeOfExpr below. This MR would be much easier to review if you broke out the removal of redundant matchers to its own MR (or just commit it as an NFC). That would leave behind the more-complex changes like things like SizeOfExpr.