Author: Baranov Victor Date: 2026-06-16T10:12:56+03:00 New Revision: 4ae4a15e5a7eb553408e745035f3aa9498b9243d
URL: https://github.com/llvm/llvm-project/commit/4ae4a15e5a7eb553408e745035f3aa9498b9243d DIFF: https://github.com/llvm/llvm-project/commit/4ae4a15e5a7eb553408e745035f3aa9498b9243d.diff LOG: Revert "[clang-tidy][NFC] Add more test coverage for tidy errors" (#204073) Reverts llvm/llvm-project#203987 Added: Modified: Removed: clang-tools-extra/test/clang-tidy/infrastructure/cli-argument-errors.cpp clang-tools-extra/test/clang-tidy/infrastructure/config-file-parse-errors.cpp clang-tools-extra/test/clang-tidy/infrastructure/config-option-errors.cpp clang-tools-extra/test/clang-tidy/infrastructure/export-fixes-errors.cpp clang-tools-extra/test/clang-tidy/infrastructure/list-checks-no-checks.cpp clang-tools-extra/test/clang-tidy/infrastructure/vfsoverlay-errors.cpp ################################################################################ diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/cli-argument-errors.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/cli-argument-errors.cpp deleted file mode 100644 index 68acb72f69333..0000000000000 --- a/clang-tools-extra/test/clang-tidy/infrastructure/cli-argument-errors.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// RUN: not clang-tidy -- 2>&1 | FileCheck %s -check-prefix=CHECK-NO-INPUT -// CHECK-NO-INPUT: Error: no input files specified. - -// RUN: not clang-tidy -checks='-*' %s -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-NO-CHECKS -// CHECK-NO-CHECKS: Error: no checks enabled. - -// OK with --allow-no-checks -// RUN: clang-tidy -checks='-*' --allow-no-checks %s -- 2>&1 | count 0 - -// RUN: not clang-tidy --line-filter='not json' %s -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-LINE-FILTER -// CHECK-LINE-FILTER: Invalid LineFilter: diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/config-file-parse-errors.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/config-file-parse-errors.cpp deleted file mode 100644 index ac3c230e0e3cc..0000000000000 --- a/clang-tools-extra/test/clang-tidy/infrastructure/config-file-parse-errors.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: rm -rf %t.dir -// RUN: mkdir -p %t.dir -// RUN: echo 'not valid yaml: ][' > %t.dir/.clang-tidy -// RUN: cp %s %t.dir/test.cpp -// RUN: clang-tidy %t.dir/test.cpp -checks='misc-explicit-constructor' -- 2>&1 \ -// RUN: | FileCheck %s - -// CHECK: Error parsing {{.*}}.clang-tidy: - -class A { A(int) {} }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/config-option-errors.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/config-option-errors.cpp deleted file mode 100644 index 46265b2538d2e..0000000000000 --- a/clang-tools-extra/test/clang-tidy/infrastructure/config-option-errors.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// RUN: not clang-tidy --config='not valid yaml: ][' \ -// RUN: -checks='misc-explicit-constructor' %s -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-INVALID -// CHECK-INVALID: Error: invalid configuration specified. - -// RUN: not clang-tidy --config='{}' --config-file=%S/Inputs/config-file/config-file %s -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-MUTUAL -// CHECK-MUTUAL: Error: --config-file and --config are mutually exclusive. - -// RUN: not clang-tidy --config-file=%t.nonexistent \ -// RUN: -checks='misc-explicit-constructor' %s -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-NOT-FOUND -// CHECK-NOT-FOUND: Error: can't read config-file '{{.*}}.nonexistent': diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/export-fixes-errors.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/export-fixes-errors.cpp deleted file mode 100644 index 3203c485b6d5e..0000000000000 --- a/clang-tools-extra/test/clang-tidy/infrastructure/export-fixes-errors.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: not clang-tidy \ -// RUN: --export-fixes=%t.no-such-directory/fixes.yaml \ -// RUN: -checks='misc-explicit-constructor' %s -- 2>&1 \ -// RUN: | FileCheck %s - -// CHECK: Error opening output file: - -class A { A(int) {} }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/list-checks-no-checks.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/list-checks-no-checks.cpp deleted file mode 100644 index d2abd2d0e5bb3..0000000000000 --- a/clang-tools-extra/test/clang-tidy/infrastructure/list-checks-no-checks.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// RUN: not clang-tidy --list-checks -checks='-*' -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-ERROR -// CHECK-ERROR: No checks enabled. - -// RUN: clang-tidy --list-checks -checks='-*' --allow-no-checks -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-OK -// CHECK-OK: Enabled checks: diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/vfsoverlay-errors.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/vfsoverlay-errors.cpp deleted file mode 100644 index 2e568853de009..0000000000000 --- a/clang-tools-extra/test/clang-tidy/infrastructure/vfsoverlay-errors.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// RUN: not clang-tidy --vfsoverlay=%t.nonexistent.yaml \ -// RUN: -checks='misc-explicit-constructor' %s -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-MISSING -// CHECK-MISSING: Can't load virtual filesystem overlay file '{{.*}}.nonexistent.yaml': - -// Malformed overlay YAML. -// RUN: echo 'not valid yaml: ][' > %t.invalid.yaml -// RUN: not clang-tidy --vfsoverlay=%t.invalid.yaml \ -// RUN: -checks='misc-explicit-constructor' %s -- 2>&1 \ -// RUN: | FileCheck %s -check-prefix=CHECK-INVALID -// CHECK-INVALID: Error: invalid virtual filesystem overlay file '{{.*}}.invalid.yaml'. _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
