[clang-tools-extra] [clang-tidy] Extend readability-container-size-empty to std::size() (PR #201231)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 3 03:48:40 PDT 2026
================
@@ -406,7 +419,7 @@ void ContainerSizeEmptyCheck::check(const MatchFinder::MatchResult &Result) {
"for emptiness instead of %0");
if (const auto *SizeMethod =
Result.Nodes.getNodeAs<NamedDecl>("SizeMethod"))
- Diag << SizeMethod;
+ Diag << SizeMethod->getDeclName();
----------------
vbvictor wrote:
Is this needed? Otherwise we would print full name or ..? Without it, will we print "::std::size"? This is also fine.
https://github.com/llvm/llvm-project/pull/201231
More information about the cfe-commits
mailing list