[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 28 01:14:05 PDT 2018
kbobyrev added inline comments.
================
Comment at: clang-tidy/abseil/NoInternalDepsCheck.cpp:24
+ auto &SourceManager = Finder->getASTContext().getSourceManager();
+ SourceLocation loc = Node.getBeginLoc();
+ if (loc.isInvalid())
----------------
I think @hokein's comment wasn't addressed despite being checked: `loc` should become `Loc` to comply with the LLVM naming rules.
================
Comment at: clang-tidy/abseil/NoInternalDepsCheck.cpp:32
+ StringRef Filename = FileEntry->getName();
+ llvm::Regex RE(
+ "absl/(algorithm|base|container|debugging|memory|meta|numeric|strings|"
----------------
Nit: maybe replace with `Filename.startswith("absl/")` then use `std::any_of` on `Filename.drop_front("absl/".size())`?
https://reviews.llvm.org/D50542
More information about the cfe-commits
mailing list