[PATCH] D91303: [clang-tidy] readability-container-size-empty: simplify implementation
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 22 10:50:35 PST 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM!
================
Comment at: clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp:101
- ignoringImpCasts(stringLiteral(hasSize(0))),
- ignoringImpCasts(cxxBindTemporaryExpr(has(DefaultConstructor))),
- ignoringImplicit(DefaultConstructor),
----------------
steveire wrote:
> aaron.ballman wrote:
> > We seem to lose this case entirely?
> In `IgnoreUnlessSpelledInSource` mode, `ignoringImpCasts(cxxBindTemporaryExpr(has(DefaultConstructor)))` simplifies to `cxxConstructExpr(isDefaultConstruction())`, which is there.
Ah, exactly right, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91303/new/
https://reviews.llvm.org/D91303
More information about the cfe-commits
mailing list