[PATCH] D32346: [clang-tidy] New readability check for strlen argument

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 24 07:02:01 PDT 2017


Eugene.Zelenko added a comment.

> In https://reviews.llvm.org/D32346#733906, @Eugene.Zelenko wrote:
> 
>> It may be good idea to add check for arguments which taken from C++ containers like std::string, std::string_view, etc.
> 
> 
> Not sure how you want. Do you envision something like:
> 
>   std::string Par;
>   strlen(Par.c_str() + 1);

Even strlen(Par.c_str()) will be reasonable.


Repository:
  rL LLVM

https://reviews.llvm.org/D32346





More information about the cfe-commits mailing list