[PATCH] D101614: [clang-tidy][NFC] Simplify a lot of bugprone-sizeof-expression matchers

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 30 15:45:13 PDT 2021


steveire added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp:87
   const auto IntegerExpr = ignoringParenImpCasts(integerLiteral());
-  const auto ConstantExpr = expr(ignoringParenImpCasts(
+  const auto ConstantExpr = ignoringParenImpCasts(
       anyOf(integerLiteral(), unaryOperator(hasUnaryOperand(IntegerExpr)),
----------------
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`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101614/new/

https://reviews.llvm.org/D101614



More information about the cfe-commits mailing list