[PATCH] D17434: [Clang-tidy] Make readability-container-size-empty working with STL string

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 23:07:25 PST 2016


should probably have test coverage

On Thu, Feb 18, 2016 at 6:46 PM, Eugene Zelenko via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Eugene.Zelenko created this revision.
> Eugene.Zelenko added reviewers: alexfh, xazax.hun, aaron.ballman.
> Eugene.Zelenko added a subscriber: cfe-commits.
> Eugene.Zelenko set the repository for this revision to rL LLVM.
>
> While working with LLDB code I noticed that
> readability-container-size-empty doesn't detect problems with STL string,
> so this my attempt to fix problem.
>
> Build and regressions were OK on RHEL 6.
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D17434
>
> Files:
>   clang-tidy/readability/ContainerSizeEmptyCheck.cpp
>
> Index: clang-tidy/readability/ContainerSizeEmptyCheck.cpp
> ===================================================================
> --- clang-tidy/readability/ContainerSizeEmptyCheck.cpp
> +++ clang-tidy/readability/ContainerSizeEmptyCheck.cpp
> @@ -16,6 +16,7 @@
>
>  static bool isContainerName(llvm::StringRef ClassName) {
>    static const char *const ContainerNames[] = {"array",
> +                                               "basic_string",
>                                                 "deque",
>                                                 "forward_list",
>                                                 "list",
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160218/d087f453/attachment.html>


More information about the cfe-commits mailing list