[PATCH] D76496: [clang-tidy] add support to 3-arg find() in StringFindStartswith

2020-08-27 Thread Niko Weh via Phabricator via cfe-commits
niko updated this revision to Diff 288378. niko added a comment. Rebasing to HEAD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76496/new/ https://reviews.llvm.org/D76496 Files: clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp

[PATCH] D76496: [clang-tidy] add support to 3-arg find() in StringFindStartswith

2020-05-01 Thread Niko Weh via Phabricator via cfe-commits
niko added a comment. In D76496#1976713 , @njames93 wrote: > 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

[PATCH] D76496: [clang-tidy] add support to 3-arg find() in StringFindStartswith

2020-05-01 Thread Niko Weh via Phabricator via cfe-commits
niko updated this revision to Diff 261512. niko added a comment. [clang-tidy] add 3-arg support to StringFindStartswith via string_view Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76496/new/ https://reviews.llvm.org/D76496 Files:

[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 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-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,

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-07 Thread Niko Weh via Phabricator via cfe-commits
niko added a comment. If this is OK as it is, can someone with commit access push this? Thanks! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-06 Thread Niko Weh via Phabricator via cfe-commits
niko added inline comments. Comment at: clang-tidy/abseil/AbseilTidyModule.cpp:15 + +#include + hokein wrote: > What is this header used for? Sorry, ended up in the wrong file, moved to StringFindStartswithCheck.cpp. Repository: rCTE Clang Tools Extra

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-06 Thread Niko Weh via Phabricator via cfe-commits
niko updated this revision to Diff 137249. niko marked 4 inline comments as done. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 Files: clang-tidy/CMakeLists.txt clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-05 Thread Niko Weh via Phabricator via cfe-commits
niko marked an inline comment as done. niko added inline comments. Comment at: clang-tidy/absl/StringFindStartswithCheck.cpp:81 + auto include_hint = include_inserter_->CreateIncludeInsertion( + source.getFileID(expr->getLocStart()), "third_party/absl/strings/match.h", +

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-05 Thread Niko Weh via Phabricator via cfe-commits
niko updated this revision to Diff 137008. niko marked 11 inline comments as done. niko added a comment. Addressed reviewer comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 Files: clang-tidy/CMakeLists.txt clang-tidy/abseil/AbseilTidyModule.cpp

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-02 Thread Niko Weh via Phabricator via cfe-commits
niko added a comment. Thanks everyone for your comments! I renamed the namespace and filenames to 'abseil'. @Eugene.Zelenko, definitely interested in extending this to a C++20 modernize check and adding `absl::EndsWith()` support, would it be OK though to do this in a later patch?

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-02 Thread Niko Weh via Phabricator via cfe-commits
niko updated this revision to Diff 136821. niko marked 23 inline comments as done. niko added a comment. Renamed 'absl' to 'abseil', applied reviewer suggestions Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 Files: clang-tidy/CMakeLists.txt

[PATCH] D43847: [tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-02-27 Thread Niko Weh via Phabricator via cfe-commits
niko created this revision. niko added reviewers: ioeric, hokein. Herald added subscribers: cfe-commits, mgorny. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 Files: clang-tidy/CMakeLists.txt clang-tidy/absl/AbslTidyModule.cpp clang-tidy/absl/CMakeLists.txt