From 8c9ffe34d932e2e17cbcf351d6e37783ea5453ae Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 18 Aug 2020 15:52:37 +0100 Subject: [PATCH] [NFC][clang-tidy] Put abseil headers in alphabetical order --- .../clang-tidy/abseil/AbseilMatcher.h | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h b/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h index f58ff5bc44b2..335c333573f4 100644 --- a/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h +++ b/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h @@ -47,14 +47,18 @@ AST_POLYMORPHIC_MATCHER( if (PrefixPosition == StringRef::npos) return false; Path = Path.drop_front(PrefixPosition + AbslPrefix.size()); - static const char *AbseilLibraries[] = { - "algorithm", "base", "container", "debugging", "flags", - "hash", "iterator", "memory", "meta", "numeric", - "random", "strings", "synchronization", "status", "time", - "types", "utility"}; - return std::any_of( - std::begin(AbseilLibraries), std::end(AbseilLibraries), - [&](const char *Library) { return Path.startswith(Library); }); + static const char *AbseilLibraries[] = {"algorithm", "base", + "container", "debugging", + "flags", "hash", + "iterator", "memory", + "meta", "numeric", + "random", "status", + "strings", "synchronization", + "time", "types", + "utility"}; + return llvm::any_of(AbseilLibraries, [&](const char *Library) { + return Path.startswith(Library); + }); } } // namespace ast_matchers