Extends readability-container-size-empty to check std::string length() similar to size().
Fixes: #37603
Co-authored-by: Dmitry Venikov <quolyk@gmail.com>
Paths
| Differential D56644
[clang-tidy] readability-container-size-empty handle std::string length() ClosedPublic Authored by PiotrZSL on Jan 12 2019, 11:26 PM.
Details Summary 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
Right, it's WIP for now. Comment Actions
https://github.com/llvm-mirror/clang-tools-extra/blob/27011d1db0ee4955bab595ab51ebe264e160ed89/clang-tidy/readability/ContainerSizeEmptyCheck.cpp#L40 Comment Actions Seems to look good.
Eugene.Zelenko edited reviewers, added: hokein, JonasToth; removed: Eugene.Zelenko.Jan 13 2019, 6:02 AM Comment ActionsIt'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))? MyDeveloperDay added inline comments.
This revision now requires changes to proceed.Apr 5 2019, 5:53 AM 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:
PiotrZSL marked 10 inline comments as done. Comment Actionsrebase, add support for dependent context, update documentation This revision was not accepted when it landed; it landed in state Needs Review.Aug 31 2023, 12:57 PM Closed by commit rGefebb4e0fabe: [clang-tidy] readability-container-size-empty handle std::string length() (authored by PiotrZSL). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 547704 clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst
clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/string
clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp
|