[clang-tools-extra] 8c9ffe3 - [NFC][clang-tidy] Put abseil headers in alphabetical order

Nathan James via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 18 07:52:57 PDT 2020


Author: Nathan James
Date: 2020-08-18T15:52:47+01:00
New Revision: 8c9ffe34d932e2e17cbcf351d6e37783ea5453ae

URL: https://github.com/llvm/llvm-project/commit/8c9ffe34d932e2e17cbcf351d6e37783ea5453ae
DIFF: https://github.com/llvm/llvm-project/commit/8c9ffe34d932e2e17cbcf351d6e37783ea5453ae.diff

LOG: [NFC][clang-tidy] Put abseil headers in alphabetical order

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h

Removed: 
    


################################################################################
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


        


More information about the cfe-commits mailing list