[PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 8 13:14:19 PDT 2016
omtcyfz marked an inline comment as done.
omtcyfz added a comment.
In https://reviews.llvm.org/D24349#537350, @Eugene.Zelenko wrote:
> Probably check should have options to extend list of containers and also to assume all classes with integer type size() const and bool empty() const as containers. It may be not trivial to find out all custom containers and last option will be helpful to assemble such list.
I was thinking about
In https://reviews.llvm.org/D24349#537552, @aaron.ballman wrote:
> In https://reviews.llvm.org/D24349#537549, @Eugene.Zelenko wrote:
> > Should we also check for absence of parameters in size() and empty() as well as const?
> I think that would be reasonable.
I do not agree about the const part. It should be encouraged to use const for these, but I do not think they should be a requirement.
More information about the cfe-commits