[PATCH] D76496: [clang-tidy] StringFindStartswith should ignore 3-arg find()

2020-04-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D76496#1949851 , @niko wrote: > Correct me if I'm wrong, but that seems to be in violation of IWYU? Maybe I'm > misreading this, or is the idea that higher-lever tooling (e.g. IWYU fixer) > is supposed to address that? It

[PATCH] D76496: [clang-tidy] StringFindStartswith should ignore 3-arg find()

2020-03-30 Thread Niko Weh via Phabricator via cfe-commits
niko added a comment. In D76496#1947127 , @njames93 wrote: > In D76496#1947059 , @niko wrote: > > > In D76496#1935127 , @njames93 > > wrote: > > > > > I'm not hugely

[PATCH] D76496: [clang-tidy] StringFindStartswith should ignore 3-arg find()

2020-03-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D76496#1947059 , @niko wrote: > In D76496#1935127 , @njames93 wrote: > > > I'm not hugely familiar with the abseil library, but from what I can see > > `absl::StartsWith` takes

[PATCH] D76496: [clang-tidy] StringFindStartswith should ignore 3-arg find()

2020-03-27 Thread Niko Weh via Phabricator via cfe-commits
niko added a comment. In D76496#1935127 , @njames93 wrote: > I'm not hugely familiar with the abseil library, but from what I can see > `absl::StartsWith` takes `absl::string_view` as args. Therefore surely it > makes sense to handle the 3rd arg for

[PATCH] D76496: [clang-tidy] StringFindStartswith should ignore 3-arg find()

2020-03-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not hugely familiar with the abseil library, but from what I can see `absl::StartsWith` takes `absl::string_view` as args. Therefore surely it makes sense to handle the 3rd arg for `str::find` by explicitly constructing the `absl::string_view` from the pointer and

[PATCH] D76496: [clang-tidy] StringFindStartswith should ignore 3-arg find()

2020-03-20 Thread Niko Weh via Phabricator via cfe-commits
niko created this revision. niko added a reviewer: hokein. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. string::find() has a 3-argument version, with the third argument specifying the 'length of sequence of characters to match' (for a const char* 1st argument,