[clang-tools-extra] r341925 - [clang-tidy] Add a missing comma after "flags"
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 11 03:37:08 PDT 2018
Author: d0k
Date: Tue Sep 11 03:37:08 2018
New Revision: 341925
URL: http://llvm.org/viewvc/llvm-project?rev=341925&view=rev
Log:
[clang-tidy] Add a missing comma after "flags"
Added:
clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/flags/
clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/flags/internal-file.h
Modified:
clang-tools-extra/trunk/clang-tidy/abseil/AbseilMatcher.h
clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/strings/internal-file.h
clang-tools-extra/trunk/test/clang-tidy/abseil-no-internal-dependencies.cpp
Modified: clang-tools-extra/trunk/clang-tidy/abseil/AbseilMatcher.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/abseil/AbseilMatcher.h?rev=341925&r1=341924&r2=341925&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/abseil/AbseilMatcher.h (original)
+++ clang-tools-extra/trunk/clang-tidy/abseil/AbseilMatcher.h Tue Sep 11 03:37:08 2018
@@ -43,24 +43,15 @@ AST_POLYMORPHIC_MATCHER(
// Determine whether filepath contains "absl/[absl-library]" substring, where
// [absl-library] is AbseilLibraries list entry.
StringRef Path = FileEntry->getName();
- const static llvm::SmallString<5> AbslPrefix("absl/");
+ static constexpr llvm::StringLiteral AbslPrefix("absl/");
size_t PrefixPosition = Path.find(AbslPrefix);
if (PrefixPosition == StringRef::npos)
return false;
Path = Path.drop_front(PrefixPosition + AbslPrefix.size());
- static const char *AbseilLibraries[] = {"algorithm",
- "base",
- "container",
- "debugging",
- "flags"
- "memory",
- "meta",
- "numeric",
- "strings",
- "synchronization",
- "time",
- "types",
- "utility"};
+ static const char *AbseilLibraries[] = {
+ "algorithm", "base", "container", "debugging", "flags",
+ "memory", "meta", "numeric", "strings", "synchronization",
+ "time", "types", "utility"};
return std::any_of(
std::begin(AbseilLibraries), std::end(AbseilLibraries),
[&](const char *Library) { return Path.startswith(Library); });
Added: clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/flags/internal-file.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/flags/internal-file.h?rev=341925&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/flags/internal-file.h (added)
+++ clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/flags/internal-file.h Tue Sep 11 03:37:08 2018
@@ -0,0 +1 @@
+#define USE_INTERNAL(x) absl::strings_internal::Internal##x()
Modified: clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/strings/internal-file.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/strings/internal-file.h?rev=341925&r1=341924&r2=341925&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/strings/internal-file.h (original)
+++ clang-tools-extra/trunk/test/clang-tidy/Inputs/absl/strings/internal-file.h Tue Sep 11 03:37:08 2018
@@ -31,5 +31,3 @@ class FriendUsageInternal {
namespace absl {
void OpeningNamespaceInternally() { strings_internal::InternalFunction(); }
} // namespace absl
-
-#define USE_INTERNAL(x) absl::strings_internal::Internal##x()
Modified: clang-tools-extra/trunk/test/clang-tidy/abseil-no-internal-dependencies.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/abseil-no-internal-dependencies.cpp?rev=341925&r1=341924&r2=341925&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/abseil-no-internal-dependencies.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/abseil-no-internal-dependencies.cpp Tue Sep 11 03:37:08 2018
@@ -2,6 +2,7 @@
// RUN: clang-tidy -checks='-*, abseil-no-internal-dependencies' -header-filter='.*' %s -- -I %S/Inputs 2>&1 | FileCheck %s
#include "absl/strings/internal-file.h"
+#include "absl/flags/internal-file.h"
// CHECK-NOT: warning:
#include "absl/external-file.h"
More information about the cfe-commits
mailing list