summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulie Hockett <juliehockett@google.com>2018-05-11 20:03:22 +0000
committerJulie Hockett <juliehockett@google.com>2018-05-11 20:03:22 +0000
commitb262a0489b095a3e4470a6503ca3071390b3c60c (patch)
treee10ce14454a06d7dfcff9687dab67fab4f6ece3c
parenteedb0c95a453ca7f84294032926de52db77e8abc (diff)
downloadbcm5719-llvm-b262a0489b095a3e4470a6503ca3071390b3c60c.tar.gz
bcm5719-llvm-b262a0489b095a3e4470a6503ca3071390b3c60c.zip
Revert "[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module"
This reverts commit r332125 for a failing test. llvm-svn: 332131
-rw-r--r--clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt1
-rw-r--r--clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp3
-rw-r--r--clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp118
-rw-r--r--clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.h48
-rw-r--r--clang-tools-extra/docs/ReleaseNotes.rst9
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/fuchsia-restrict-system-includes.rst32
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/list.rst1
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/a.h0
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdarg.h0
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdlib.h0
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/j.h0
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/r.h1
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/s.h0
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/t.h0
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/transitive.h3
-rw-r--r--clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/transitive2.h2
-rw-r--r--clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-all.cpp10
-rw-r--r--clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-glob.cpp9
-rw-r--r--clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-headers.cpp20
-rw-r--r--clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes.cpp25
20 files changed, 2 insertions, 280 deletions
diff --git a/clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt b/clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt
index b69a5c06470..c2ed2524906 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt
@@ -5,7 +5,6 @@ add_clang_library(clangTidyFuchsiaModule
FuchsiaTidyModule.cpp
MultipleInheritanceCheck.cpp
OverloadedOperatorCheck.cpp
- RestrictSystemIncludesCheck.cpp
StaticallyConstructedObjectsCheck.cpp
TrailingReturnCheck.cpp
VirtualInheritanceCheck.cpp
diff --git a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp b/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
index 0d3bbfe7475..67b3bc91347 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
@@ -14,7 +14,6 @@
#include "DefaultArgumentsCheck.h"
#include "MultipleInheritanceCheck.h"
#include "OverloadedOperatorCheck.h"
-#include "RestrictSystemIncludesCheck.h"
#include "StaticallyConstructedObjectsCheck.h"
#include "TrailingReturnCheck.h"
#include "VirtualInheritanceCheck.h"
@@ -37,8 +36,6 @@ public:
"fuchsia-multiple-inheritance");
CheckFactories.registerCheck<OverloadedOperatorCheck>(
"fuchsia-overloaded-operator");
- CheckFactories.registerCheck<RestrictSystemIncludesCheck>(
- "fuchsia-restrict-system-includes");
CheckFactories.registerCheck<StaticallyConstructedObjectsCheck>(
"fuchsia-statically-constructed-objects");
CheckFactories.registerCheck<TrailingReturnCheck>(
diff --git a/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp b/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp
deleted file mode 100644
index 4817e904105..00000000000
--- a/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-//===--- RestrictSystemIncludesCheck.cpp - clang-tidy----------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "RestrictSystemIncludesCheck.h"
-#include "clang/Frontend/CompilerInstance.h"
-#include "clang/Lex/HeaderSearch.h"
-#include "clang/Lex/PPCallbacks.h"
-#include "clang/Lex/Preprocessor.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/Support/Path.h"
-#include <cstring>
-
-namespace clang {
-namespace tidy {
-namespace fuchsia {
-
-class RestrictedIncludesPPCallbacks : public PPCallbacks {
-public:
- explicit RestrictedIncludesPPCallbacks(RestrictSystemIncludesCheck &Check,
- SourceManager &SM)
- : Check(Check), SM(SM) {}
-
- void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
- StringRef FileName, bool IsAngled,
- CharSourceRange FilenameRange, const FileEntry *File,
- StringRef SearchPath, StringRef RelativePath,
- const Module *Imported,
- SrcMgr::CharacteristicKind FileType) override;
- void EndOfMainFile() override;
-
-private:
- struct IncludeDirective {
- IncludeDirective() = default;
- IncludeDirective(SourceLocation Loc, CharSourceRange Range,
- StringRef Filename, StringRef FullPath, bool IsInMainFile)
- : Loc(Loc), Range(Range), IncludeFile(Filename), IncludePath(FullPath),
- IsInMainFile(IsInMainFile) {}
-
- SourceLocation Loc; // '#' location in the include directive
- CharSourceRange Range; // SourceRange for the file name
- std::string IncludeFile; // Filename as a string
- std::string IncludePath; // Full file path as a string
- bool IsInMainFile; // Whether or not the include is in the main file
- };
-
- using FileIncludes = llvm::SmallVector<IncludeDirective, 8>;
- llvm::SmallDenseMap<FileID, FileIncludes> IncludeDirectives;
-
- RestrictSystemIncludesCheck &Check;
- SourceManager &SM;
-};
-
-void RestrictedIncludesPPCallbacks::InclusionDirective(
- SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName,
- bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File,
- StringRef SearchPath, StringRef RelativePath, const Module *Imported,
- SrcMgr::CharacteristicKind FileType) {
- if (!Check.contains(FileName) && SrcMgr::isSystem(FileType)) {
- SmallString<256> FullPath;
- llvm::sys::path::append(FullPath, SearchPath);
- llvm::sys::path::append(FullPath, RelativePath);
- // Bucket the allowed include directives by the id of the file they were
- // declared in.
- IncludeDirectives[SM.getFileID(HashLoc)].emplace_back(
- HashLoc, FilenameRange, FileName, FullPath.str(),
- SM.isInMainFile(HashLoc));
- }
-}
-
-void RestrictedIncludesPPCallbacks::EndOfMainFile() {
- for (const auto &Bucket : IncludeDirectives) {
- const FileIncludes &FileDirectives = Bucket.second;
-
- // Emit fixits for all restricted includes.
- for (const auto &Include : FileDirectives) {
- // Fetch the length of the include statement from the start to just after
- // the newline, for finding the end (including the newline).
- unsigned ToLen = std::strcspn(SM.getCharacterData(Include.Loc), "\n") + 1;
- CharSourceRange ToRange = CharSourceRange::getCharRange(
- Include.Loc, Include.Loc.getLocWithOffset(ToLen));
-
- if (!Include.IsInMainFile) {
- auto D = Check.diag(
- Include.Loc,
- "system include %0 not allowed, transitively included from %1");
- D << Include.IncludeFile << SM.getFilename(Include.Loc);
- D << FixItHint::CreateRemoval(ToRange);
- continue;
- }
- auto D = Check.diag(Include.Loc, "system include %0 not allowed");
- D << Include.IncludeFile;
- D << FixItHint::CreateRemoval(ToRange);
- }
- }
-}
-
-void RestrictSystemIncludesCheck::registerPPCallbacks(
- CompilerInstance &Compiler) {
- Compiler.getPreprocessor().addPPCallbacks(
- llvm::make_unique<RestrictedIncludesPPCallbacks>(
- *this, Compiler.getSourceManager()));
-}
-
-void RestrictSystemIncludesCheck::storeOptions(
- ClangTidyOptions::OptionMap &Opts) {
- Options.store(Opts, "Includes", AllowedIncludes);
-}
-
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
diff --git a/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.h b/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.h
deleted file mode 100644
index d4e5ac1e79f..00000000000
--- a/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//===--- RestrictSystemIncludesCheck.h - clang-tidy---------- ----*- C++-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_RESTRICTINCLUDESSCHECK_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_RESTRICTINCLUDESSCHECK_H
-
-#include "../ClangTidy.h"
-#include "../ClangTidyDiagnosticConsumer.h"
-#include "../utils/OptionsUtils.h"
-
-namespace clang {
-namespace tidy {
-namespace fuchsia {
-
-/// Checks for allowed includes and suggests removal of any others. If no
-/// includes are specified, the check will exit without issuing any warnings.
-///
-/// For the user-facing documentation see:
-/// http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-restrict-system-includes.html
-class RestrictSystemIncludesCheck : public ClangTidyCheck {
-public:
- RestrictSystemIncludesCheck(StringRef Name, ClangTidyContext *Context)
- : ClangTidyCheck(Name, Context),
- AllowedIncludes(Options.get("Includes", "*")),
- AllowedIncludesGlobList(AllowedIncludes) {}
-
- void registerPPCallbacks(CompilerInstance &Compiler) override;
- void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
- bool contains(StringRef FileName) {
- return AllowedIncludesGlobList.contains(FileName);
- }
-
-private:
- std::string AllowedIncludes;
- GlobList AllowedIncludesGlobList;
-};
-
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
-
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_RESTRICTINCLUDESSCHECK_H
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 61b6407c343..d005a2a113c 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -110,13 +110,8 @@ Improvements to clang-tidy
Checks whether a ``std::string::find()`` result is compared with 0, and
suggests replacing with ``absl::StartsWith()``.
-- New `fuchsia-restrict-system-includes
- <http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-restrict-system-includes.html>`_ check
-
- Checks for allowed system includes and suggests removal of any others.
-
-- New `fuchsia-statically-constructed-objects
- <http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-statically-constructed-objects.html>`_ check
+- New :doc:`fuchsia-statically-constructed-objects
+ <clang-tidy/checks/fuchsia-statically-constructed-objects>` check.
Warns if global, non-trivial objects with static storage are constructed,
unless the object is statically initialized with a ``constexpr`` constructor
diff --git a/clang-tools-extra/docs/clang-tidy/checks/fuchsia-restrict-system-includes.rst b/clang-tools-extra/docs/clang-tidy/checks/fuchsia-restrict-system-includes.rst
deleted file mode 100644
index 622e025d115..00000000000
--- a/clang-tools-extra/docs/clang-tidy/checks/fuchsia-restrict-system-includes.rst
+++ /dev/null
@@ -1,32 +0,0 @@
-.. title:: clang-tidy - fuchsia-restrict-system-includes
-
-fuchsia-restrict-system-includes
-================================
-
-Checks for allowed system includes and suggests removal of any others.
-
-It is important to note that running this check with fixes may break code, as
-the fix removes headers. Fixes are applied to source and header files, but not
-to system headers.
-
-For example, given the allowed system includes 'a.h,b*':
-
-.. code-block:: c++
-
- #include <a.h>
- #include <b.h>
- #include <bar.h>
- #include <c.h> // Warning, as c.h is not explicitly allowed
-
-All system includes can be allowed with '*', and all can be disallowed with an
-empty string ('').
-
-Options
--------
-
-.. option:: Includes
-
- A string containing a comma separated glob list of allowed include filenames.
- Similar to the -checks glob list for running clang-tidy itself, the two
- wildcard characters are '*' and '-', to include and exclude globs,
- respectively.The default is '*', which allows all includes.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index 4ce3779fa57..add8bdbe357 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -95,7 +95,6 @@ Clang-Tidy Checks
fuchsia-default-arguments
fuchsia-multiple-inheritance
fuchsia-overloaded-operator
- fuchsia-restrict-system-includes
fuchsia-statically-constructed-objects
fuchsia-trailing-return
fuchsia-virtual-inheritance
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/a.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/a.h
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/a.h
+++ /dev/null
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdarg.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdarg.h
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdarg.h
+++ /dev/null
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdlib.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdlib.h
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/cstdlib.h
+++ /dev/null
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/j.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/j.h
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/j.h
+++ /dev/null
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/r.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/r.h
deleted file mode 100644
index 56757a701bf..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/r.h
+++ /dev/null
@@ -1 +0,0 @@
-void f() {}
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/s.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/s.h
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/s.h
+++ /dev/null
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/t.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/t.h
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/t.h
+++ /dev/null
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/transitive.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/transitive.h
deleted file mode 100644
index 6dba769fb47..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/system/transitive.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <r.h>
-#include <t.h>
-#include <s.h>
diff --git a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/transitive2.h b/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/transitive2.h
deleted file mode 100644
index ea567885f34..00000000000
--- a/clang-tools-extra/test/clang-tidy/Inputs/fuchsia-restrict-system-includes/transitive2.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <s.h>
-#include <t.h>
diff --git a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-all.cpp b/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-all.cpp
deleted file mode 100644
index 21f4b68b9c8..00000000000
--- a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-all.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %check_clang_tidy %s fuchsia-restrict-system-includes %t \
-// RUN: -- -config="{CheckOptions: [{key: fuchsia-restrict-system-includes.Includes, value: ''}]}" \
-// RUN: -- -std=c++11 -I %S/Inputs/fuchsia-restrict-system-includes -isystem %S/Inputs/fuchsia-restrict-system-includes/system
-
-#include <cstdlib.h>
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include cstdlib.h not allowed
-#include <cstdarg.h>
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include cstdarg.h not allowed
-#include <t.h>
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include t.h not allowed
diff --git a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-glob.cpp b/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-glob.cpp
deleted file mode 100644
index 334990dd84d..00000000000
--- a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-glob.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %check_clang_tidy %s fuchsia-restrict-system-includes %t \
-// RUN: -- -config="{CheckOptions: [{key: fuchsia-restrict-system-includes.Includes, value: 'cstd*'}]}" \
-// RUN: -- -std=c++11 -I %S/Inputs/fuchsia-restrict-system-includes -isystem %S/Inputs/fuchsia-restrict-system-includes/system
-
-#include <cstdlib.h>
-#include <cstdarg.h>
-#include <t.h>
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include t.h not allowed
-// CHECK-FIXES-NOT: #include <t.h>
diff --git a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-headers.cpp b/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-headers.cpp
deleted file mode 100644
index 109e1d5a459..00000000000
--- a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes-headers.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: cp -r %S/Inputs/fuchsia-restrict-system-includes %T/Inputs
-// RUN: %check_clang_tidy %s fuchsia-restrict-system-includes %t \
-// RUN: -- -config="{CheckOptions: [{key: fuchsia-restrict-system-includes.Includes, value: 'transitive.h,s.h'}]}" \
-// RUN: -system-headers -header-filter=.* \
-// RUN: -- -std=c++11 -I %T/Inputs/fuchsia-restrict-system-includes -isystem %T/Inputs/fuchsia-restrict-system-includes/system
-// RUN: FileCheck -input-file=%T/Inputs/fuchsia-restrict-system-includes/transitive2.h %s -check-prefix=CHECK-FIXES
-
-// transitive.h includes <r.h> and <t.h>
-#include <transitive.h>
-// CHECK-MESSAGES: :1:1: warning: system include r.h not allowed, transitively included from {{(.*\/)*}}Inputs/fuchsia-restrict-system-includes/system/transitive.h
-// CHECK-MESSAGES: :2:1: warning: system include t.h not allowed, transitively included from {{(.*\/)*}}Inputs/fuchsia-restrict-system-includes/system/transitive.h
-
-// transitive.h includes <s.h> and <t.h>
-#include "transitive2.h"
-// CHECK-MESSAGES: :2:1: warning: system include t.h not allowed, transitively included from {{(.*\/)*}}Inputs/fuchsia-restrict-system-includes/transitive2.h
-// CHECK-FIXES-NOT: #include <t.h>
-
-int main() {
- // f() is declared in r.h
-}
diff --git a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes.cpp b/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes.cpp
deleted file mode 100644
index e2ba71060c3..00000000000
--- a/clang-tools-extra/test/clang-tidy/fuchsia-restrict-system-includes.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %check_clang_tidy %s fuchsia-restrict-system-includes %t \
-// RUN: -- -config="{CheckOptions: [{key: fuchsia-restrict-system-includes.Includes, value: 's.h'}]}" \
-// RUN: -- -std=c++11 -I %S/Inputs/fuchsia-restrict-system-includes -isystem %S/Inputs/fuchsia-restrict-system-includes/system
-
-#include "a.h"
-
-#include <s.h>
-#include <t.h>
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include t.h not allowed
-// CHECK-FIXES-NOT: #include <t.h>
-
-#include "s.h"
-#include "t.h"
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include t.h not allowed
-// CHECK-FIXES-NOT: #include "t.h"
-
-#define foo <j.h>
-
-#include foo
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include j.h not allowed
-// CHECK-FIXES-NOT: #include foo
-
-#/* comment */ include /* comment */ foo
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include j.h not allowed
-// CHECK-FIXES-NOT: # /* comment */ include /* comment */ foo
OpenPOWER on IntegriCloud