forked from OSchip/llvm-project
[NFC][clang-tidy] Put abseil headers in alphabetical order
This commit is contained in:
parent
abd33bf5ef
commit
8c9ffe34d9
|
@ -47,14 +47,18 @@ AST_POLYMORPHIC_MATCHER(
|
||||||
if (PrefixPosition == StringRef::npos)
|
if (PrefixPosition == StringRef::npos)
|
||||||
return false;
|
return false;
|
||||||
Path = Path.drop_front(PrefixPosition + AbslPrefix.size());
|
Path = Path.drop_front(PrefixPosition + AbslPrefix.size());
|
||||||
static const char *AbseilLibraries[] = {
|
static const char *AbseilLibraries[] = {"algorithm", "base",
|
||||||
"algorithm", "base", "container", "debugging", "flags",
|
"container", "debugging",
|
||||||
"hash", "iterator", "memory", "meta", "numeric",
|
"flags", "hash",
|
||||||
"random", "strings", "synchronization", "status", "time",
|
"iterator", "memory",
|
||||||
"types", "utility"};
|
"meta", "numeric",
|
||||||
return std::any_of(
|
"random", "status",
|
||||||
std::begin(AbseilLibraries), std::end(AbseilLibraries),
|
"strings", "synchronization",
|
||||||
[&](const char *Library) { return Path.startswith(Library); });
|
"time", "types",
|
||||||
|
"utility"};
|
||||||
|
return llvm::any_of(AbseilLibraries, [&](const char *Library) {
|
||||||
|
return Path.startswith(Library);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ast_matchers
|
} // namespace ast_matchers
|
||||||
|
|
Loading…
Reference in New Issue