PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed.
- Release notes entry is missing. - Commit/Change description should be updated ================ Comment at: clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp:171 + anyOf(stringLiteral(hasSize(0)), + userDefinedLiteral(hasDescendant(stringLiteral(hasSize(0)))), + cxxConstructExpr(isDefaultConstruction()), ---------------- Probably best would be to write matcher like this: ``` AST_MATCHER_P(UserDefinedLiteral, hasLiteral, Matcher<Expr>, InnerMatcher) { if (const Expr* CookedLiteral = Node.getCookedLiteral()) { return InnerMatcher.matches(CookedLiteral, Finder, Builder); } return false; } ``` and use it instead of hasDescendant ``` userDefinedLiteral(hasLiteral(stringLiteral(hasSize(0)))), ``` ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp:791 +} \ No newline at end of file ---------------- Add this new line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158346/new/ https://reviews.llvm.org/D158346 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits