[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith
Niko Weh via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 5 08:04:57 PST 2018
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",
+ false);
----------------
niko wrote:
> hokein wrote:
> > The include path maybe different in different project.
> >
> > I think we also need an option for the inserting header, and make it default to `absl/strings/match.h`.
> Instead of having a "AbseilStringsMatchHeader" option, does it make sense to have a "AbseilIncludeDir" option here & default that to `absl`? (esp. if there are going to be other abseil-checks in the future...)
Discussed offline with @hokein. Will leave AbseilStringsMatchHeader.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43847
More information about the cfe-commits
mailing list