[PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 07:11:25 PDT 2015
alexfh created this revision.
alexfh added a reviewer: djasper.
alexfh added a subscriber: cfe-commits.
sizeof(some_std_string) is likely to be an error. This check finds this
pattern and suggests using .size() instead.
http://reviews.llvm.org/D12759
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/SizeofContainerCheck.cpp
clang-tidy/misc/SizeofContainerCheck.h
docs/clang-tidy/checks/list.rst
docs/clang-tidy/checks/misc-sizeof-container.rst
test/clang-tidy/misc-sizeof-container.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12759.34437.patch
Type: text/x-patch
Size: 8145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150910/6c4b5d20/attachment-0001.bin>
More information about the cfe-commits
mailing list