[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 10:00:48 PDT 2016


omtcyfz marked an inline comment as done.

================
Comment at: clang-tidy/readability/ContainerSizeEmptyCheck.cpp:33
@@ +32,3 @@
+  const auto validContainer = namedDecl(
+      has(functionDecl(
+          isPublic(), hasName("size"), returns(isInteger()),
----------------
Thank you!

Blacklisted these types.

Actually, I believe if someone has `bool size()` in their codebase there's still a problem...


https://reviews.llvm.org/D24349





More information about the cfe-commits mailing list