llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-tidy

Author: Victor Chernyakin (localspook)

<details>
<summary>Changes</summary>

These unit tests only duplicate the tests in 
`clang-tools-extra/test/clang-tidy/checkers/objc/forbidden-subclassing.m`. 

---
Full diff: https://github.com/llvm/llvm-project/pull/185832.diff


4 Files Affected:

- (modified) clang-tools-extra/docs/clang-tidy/Contributing.rst (-1) 
- (modified) clang-tools-extra/unittests/clang-tidy/CMakeLists.txt (-1) 
- (removed) clang-tools-extra/unittests/clang-tidy/ObjCModuleTest.cpp (-48) 
- (modified) 
llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn (-1) 


``````````diff
diff --git a/clang-tools-extra/docs/clang-tidy/Contributing.rst 
b/clang-tools-extra/docs/clang-tidy/Contributing.rst
index 72444480ece0e..a1c93f44cfd9b 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 167f5d3def06b..26ceb977d27a6 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 826978b0f3b69..0000000000000
--- 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<ClangTidyError> Errors;
-  runCheckOnCode<ForbiddenSubclassingCheck>(
-      "@interface Foo\n"
-      "@end\n"
-      "@interface Bar : Foo\n"
-      "@end\n",
-      &Errors,
-      "input.m");
-  EXPECT_EQ(0ul, Errors.size());
-}
-
-TEST(ObjCForbiddenSubclassing, ForbiddenSubclass) {
-  std::vector<ClangTidyError> Errors;
-  runCheckOnCode<ForbiddenSubclassingCheck>(
-      "@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 e52400e35377c..ca374f865287f 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",

``````````

</details>


https://github.com/llvm/llvm-project/pull/185832
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to