Extends readability-container-size-empty to check std::string length() similar to size().
Fixes: #37603
Co-authored-by: Dmitry Venikov <quolyk@gmail.com>
Differential D56644
[clang-tidy] readability-container-size-empty handle std::string length() PiotrZSL on Jan 12 2019, 11:26 PM. Authored by
Details Extends readability-container-size-empty to check std::string length() similar to size(). Fixes: #37603 Co-authored-by: Dmitry Venikov <quolyk@gmail.com>
Diff Detail
Event TimelineComment Actions For now, I just added tests. I have several questions, as I'm beginner (ContainerSizeEmptyCheck.cpp).
Comment Actions https://github.com/llvm-mirror/clang-tools-extra/blob/27011d1db0ee4955bab595ab51ebe264e160ed89/clang-tidy/readability/ContainerSizeEmptyCheck.cpp#L40 Comment Actions Seems to look good.
Comment Actions It'll be worth to mention change in Release Notes (in changes list, in alphabetical order). Comment Actions Could you please run it over LLVM or another significant codebase and check if there are miss-transformations (run with fix and then compile (+ tests optimally))?
Comment Actions any news here? do you plan to finish this patch @Quolyk ? Comment Actions Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto main:HEAD and:
|
Does it still work if only one of these exists?