[clang-tools-extra] [clang-tidy] Adjust size-empty doc because C++11 size() is constant-time (PR #117629)

Niels Dekker via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 03:11:46 PST 2024


N-Dekker wrote:

Thanks for your encouragement, @HerrCai0907. I just [force-pushed](https://github.com/llvm/llvm-project/compare/87688f9ec5e74f9b3c74df05a69a4f822966b5f1..ab3009e825af5e323e749dfdbd2300ef68677f14), as you suggested.

To further clarify my motivation, I believe that C++ users actually got the impression from the documentation that this check will make their code faster. ITK pull request https://github.com/InsightSoftwareConsortium/ITK/pull/4985 ("PERF: readability container size empty") was also labeled as a performance improvement, while I think it is very unlikely to have any effect on the run-time performance.

https://github.com/llvm/llvm-project/pull/117629


More information about the cfe-commits mailing list