diff --git a/clang-tools-extra/docs/clang-tidy/Contributing.rst b/clang-tools-extra/docs/clang-tidy/Contributing.rst index 79edae547215..463cfa1bd417 100644 --- a/clang-tools-extra/docs/clang-tidy/Contributing.rst +++ b/clang-tools-extra/docs/clang-tidy/Contributing.rst @@ -120,7 +120,6 @@ The Directory Structure |-- ClangTidyTest.h |-- GoogleModuleTest.cpp |-- LLVMModuleTest.cpp - |-- ObjCModuleTest.cpp ... diff --git a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt index 167f5d3def06..26ceb977d27a 100644 --- a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt +++ b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt @@ -30,7 +30,6 @@ add_extra_unittest(ClangTidyTests LLVMModuleTest.cpp ModernizeModuleTest.cpp NamespaceAliaserTest.cpp - ObjCModuleTest.cpp OptionsProviderTest.cpp OverlappingReplacementsTest.cpp UsingInserterTest.cpp diff --git a/clang-tools-extra/unittests/clang-tidy/ObjCModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/ObjCModuleTest.cpp deleted file mode 100644 index 826978b0f3b6..000000000000 --- a/clang-tools-extra/unittests/clang-tidy/ObjCModuleTest.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===---- ObjCModuleTest.cpp - clang-tidy ---------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "ClangTidyTest.h" -#include "gtest/gtest.h" -#include "objc/ForbiddenSubclassingCheck.h" - -using namespace clang::tidy::objc; - -namespace clang { -namespace tidy { -namespace test { - -TEST(ObjCForbiddenSubclassing, AllowedSubclass) { - std::vector Errors; - runCheckOnCode( - "@interface Foo\n" - "@end\n" - "@interface Bar : Foo\n" - "@end\n", - &Errors, - "input.m"); - EXPECT_EQ(0ul, Errors.size()); -} - -TEST(ObjCForbiddenSubclassing, ForbiddenSubclass) { - std::vector Errors; - runCheckOnCode( - "@interface UIImagePickerController\n" - "@end\n" - "@interface Foo : UIImagePickerController\n" - "@end\n", - &Errors, - "input.m"); - EXPECT_EQ(1ul, Errors.size()); - EXPECT_EQ( - "Objective-C interface 'Foo' subclasses 'UIImagePickerController', which is not intended to be subclassed", - Errors[0].Message.Message); -} - -} // namespace test -} // namespace tidy -} // namespace clang diff --git a/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn index e52400e35377..ca374f865287 100644 --- a/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn +++ b/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn @@ -43,7 +43,6 @@ unittest("ClangTidyTests") { "LexerUtilsTest.cpp", "ModernizeModuleTest.cpp", "NamespaceAliaserTest.cpp", - "ObjCModuleTest.cpp", "OptionsProviderTest.cpp", "OverlappingReplacementsTest.cpp", "ReadabilityModuleTest.cpp",