[clang-tools-extra] [clang-tidy][NFC] Implicitly add checkers/Inputs/Headers as system headers in tests (PR #185442)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 9 08:22:30 PDT 2026


https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/185442

None

>From a8eec0a0c3aaf1c3c47dc58dae768e02382c0ea4 Mon Sep 17 00:00:00 2001
From: Victor Baranov <bar.victor.2002 at gmail.com>
Date: Mon, 9 Mar 2026 18:21:39 +0300
Subject: [PATCH] [clang-tidy][NFC] Implicitly add checkers/Inputs/Headers as
 system headers in tests

---
 .../test/clang-tidy/check_clang_tidy.py            |  8 ++++++++
 .../checkers/abseil/redundant-strcat-calls.cpp     |  2 +-
 .../checkers/abseil/string-find-startswith.cpp     |  4 +---
 .../clang-tidy/checkers/boost/use-ranges-pipe.cpp  |  4 ++--
 .../test/clang-tidy/checkers/boost/use-ranges.cpp  |  4 ++--
 .../clang-tidy/checkers/boost/use-to-string.cpp    |  2 +-
 .../checkers/bugprone/argument-comment.cpp         |  2 +-
 .../checkers/bugprone/dangling-handle.cpp          |  7 ++-----
 ...asily-swappable-parameters-prefixsuffixname.cpp |  2 +-
 .../checkers/bugprone/signal-handler-minimal.c     |  4 +---
 .../checkers/bugprone/signal-handler-posix.c       |  4 +---
 .../clang-tidy/checkers/bugprone/signal-handler.c  |  4 ++--
 .../checkers/bugprone/signal-handler.cpp           |  2 +-
 .../checkers/bugprone/sizeof-container.cpp         |  2 +-
 .../bugprone/std-namespace-modification.cpp        |  2 +-
 .../bugprone/string-constructor-options.cpp        |  3 +--
 .../bugprone/string-integer-assignment.cpp         |  2 +-
 .../checkers/bugprone/suspicious-include.cpp       |  2 +-
 .../suspicious-stringview-data-usage-options.cpp   |  2 +-
 .../bugprone/suspicious-stringview-data-usage.cpp  |  2 +-
 .../bugprone/unchecked-optional-access.cpp         |  2 +-
 .../checkers/bugprone/unused-return-value.cpp      |  2 +-
 .../cert/uppercase-literal-suffix-integer.cpp      |  2 +-
 .../checkers/google/objc-function-naming.m         |  2 +-
 .../clang-tidy/checkers/llvm/include-order.cpp     |  2 +-
 .../test/clang-tidy/checkers/llvm/use-ranges.cpp   |  2 +-
 .../llvmlibc/Inputs/system/{stdio.h => locale.h}   |  0
 .../llvmlibc/Inputs/system/{stdlib.h => math.h}    |  0
 .../llvmlibc/Inputs/system/{string.h => time.h}    |  0
 .../llvmlibc/restrict-system-libc-headers.cpp      | 14 +++++++-------
 .../modernize/make-unique-default-init.cpp         |  2 +-
 .../clang-tidy/checkers/modernize/make-unique.cpp  |  2 +-
 .../modernize/pass-by-value-macro-header.cpp       |  2 +-
 .../checkers/modernize/replace-random-shuffle.cpp  |  2 +-
 .../checkers/modernize/return-braced-init-list.cpp |  2 +-
 .../checkers/modernize/shrink-to-fit.cpp           |  2 +-
 .../use-emplace-ignore-implicit-constructors.cpp   |  3 +--
 .../checkers/modernize/use-nodiscard.cpp           |  3 +--
 .../checkers/modernize/use-ranges-pipe.cpp         |  4 ++--
 .../clang-tidy/checkers/modernize/use-ranges.cpp   |  4 ++--
 ...-scope-lock-warn-on-using-and-typedef-false.cpp |  2 +-
 .../modernize/use-scoped-lock-no-crash.cpp         |  2 +-
 .../use-scoped-lock-warn-on-single-locks-false.cpp |  2 +-
 .../checkers/modernize/use-scoped-lock.cpp         |  2 +-
 .../checkers/modernize/use-starts-ends-with.cpp    |  4 +---
 .../checkers/modernize/use-std-format-custom.cpp   |  7 ++-----
 .../checkers/modernize/use-std-format-fmt.cpp      |  4 +---
 .../checkers/modernize/use-std-format-member.cpp   |  4 +---
 .../checkers/modernize/use-std-format.cpp          |  4 ++--
 .../checkers/modernize/use-std-print-absl.cpp      |  7 ++-----
 .../checkers/modernize/use-std-print-custom.cpp    |  4 +---
 .../checkers/modernize/use-std-print-fmt.cpp       |  4 +---
 .../checkers/modernize/use-std-print-member.cpp    |  4 +---
 .../checkers/modernize/use-std-print.cpp           |  4 ++--
 .../modernize/use-string-view-custom-view.cpp      |  4 +---
 .../checkers/modernize/use-string-view-cxx20.cpp   |  2 +-
 .../checkers/modernize/use-string-view-ignored.cpp |  4 +---
 .../checkers/modernize/use-string-view.cpp         |  4 +---
 ...railing-return-type-transform-lambdas-cxx14.cpp |  2 +-
 .../use-trailing-return-type-transform-lambdas.cpp |  6 +++---
 .../checkers/performance/faster-string-find.cpp    |  4 ++--
 .../inefficient-string-concatenation-strict.cpp    |  4 +---
 .../inefficient-string-concatenation.cpp           |  2 +-
 .../performance/inefficient-vector-operation.cpp   |  3 +--
 .../checkers/performance/move-constructor-init.cpp | 12 +++++-------
 .../performance/string-view-conversions-cxx20.cpp  |  4 +---
 .../performance/string-view-conversions.cpp        |  4 +---
 .../unnecessary-value-param-includestyle.cpp       |  2 +-
 .../performance/unnecessary-value-param.cpp        |  2 +-
 .../checkers/readability/container-contains.cpp    |  4 +---
 .../readability/container-data-pointer.cpp         |  4 ++--
 .../checkers/readability/container-size-empty.cpp  |  2 +-
 ...rt-member-functions-to-static-deducing-this.cpp |  2 +-
 .../checkers/readability/else-after-return.cpp     |  2 +-
 .../readability/isolate-declaration-cxx17.cpp      |  2 +-
 .../checkers/readability/qualified-auto-cxx20.cpp  |  2 +-
 .../checkers/readability/qualified-auto.cpp        |  5 ++---
 .../readability/redundant-smartptr-get.cpp         |  2 +-
 .../readability/redundant-string-cstr-format.cpp   |  4 ++--
 .../readability/redundant-string-cstr-function.cpp |  3 +--
 .../checkers/readability/redundant-string-cstr.cpp |  2 +-
 .../checkers/readability/redundant-string-init.cpp |  2 +-
 .../readability/simplify-subscript-expr.cpp        |  3 +--
 .../string-compare-custom-string-classes.cpp       |  2 +-
 .../checkers/readability/string-compare.cpp        |  2 +-
 .../readability/uppercase-literal-suffix-cxx23.cpp |  2 +-
 .../uppercase-literal-suffix-floating-point.cpp    |  2 +-
 ...e-literal-suffix-hexadecimal-floating-point.cpp |  2 +-
 ...ppercase-literal-suffix-integer-custom-list.cpp |  3 +--
 .../uppercase-literal-suffix-integer-ms.cpp        |  2 +-
 .../uppercase-literal-suffix-integer.cpp           |  2 +-
 91 files changed, 121 insertions(+), 164 deletions(-)
 rename clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/{stdio.h => locale.h} (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/{stdlib.h => math.h} (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/{string.h => time.h} (100%)

diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
index 62377a1ccbf1b..601e067db12e9 100755
--- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
+++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
@@ -156,6 +156,14 @@ def __init__(self, args: argparse.Namespace, extra_args: List[str]) -> None:
         # implementations of relevant APIs.
         self.clang_extra_args.append("-nostdinc++")
 
+        # Include the clang-tidy test headers directory as a system include
+        # path so individual tests don't need to specify it.
+        headers_dir = os.path.join(
+            os.path.dirname(__file__), "checkers", "Inputs", "Headers"
+        )
+        if os.path.isdir(headers_dir):
+            self.clang_extra_args.extend(["-isystem", headers_dir])
+
         if self.resource_dir is not None:
             self.clang_extra_args.append("-resource-dir=%s" % self.resource_dir)
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/abseil/redundant-strcat-calls.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil/redundant-strcat-calls.cpp
index 8fa1b1e1ad906..7159b5f52b8ff 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/abseil/redundant-strcat-calls.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/abseil/redundant-strcat-calls.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s abseil-redundant-strcat-calls %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s abseil-redundant-strcat-calls %t
 #include <string>
 
 namespace absl {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/abseil/string-find-startswith.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil/string-find-startswith.cpp
index c2ce0e347e074..9c2a1376f76f2 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/abseil/string-find-startswith.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/abseil/string-find-startswith.cpp
@@ -1,9 +1,7 @@
 // RUN: %check_clang_tidy -std=c++17 %s abseil-string-find-startswith %t -- \
 // RUN:   -config="{CheckOptions: \
 // RUN:     {abseil-string-find-startswith.StringLikeClasses: \
-// RUN:       '::std::basic_string;::std::basic_string_view;::basic_string'}}" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:       '::std::basic_string;::std::basic_string_view;::basic_string'}}"
 #include <string>
 
 using size_t = decltype(sizeof(int));
diff --git a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp
index 9254c461e8188..aaf3ce512ba7f 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges-pipe.cpp
@@ -1,7 +1,7 @@
 // RUN: %check_clang_tidy -std=c++14-or-later %s boost-use-ranges %t -check-suffixes=,PIPE \
 // RUN:   -config="{CheckOptions: { \
-// RUN:     boost-use-ranges.UseReversePipe: true }}" -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/
-// RUN: %check_clang_tidy -std=c++14-or-later %s boost-use-ranges %t -check-suffixes=,NOPIPE  -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/
+// RUN:     boost-use-ranges.UseReversePipe: true }}" -- -I %S/Inputs/use-ranges/
+// RUN: %check_clang_tidy -std=c++14-or-later %s boost-use-ranges %t -check-suffixes=,NOPIPE  -- -I %S/Inputs/use-ranges/
 
 // CHECK-FIXES: #include <boost/algorithm/cxx11/is_sorted.hpp>
 // CHECK-FIXES: #include <boost/range/adaptor/reversed.hpp>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp
index 0e52607099801..c32fc664888e8 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/boost/use-ranges.cpp
@@ -1,5 +1,5 @@
-// RUN: %check_clang_tidy -std=c++14 %s boost-use-ranges %t  -- -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/
-// RUN: %check_clang_tidy -std=c++17-or-later %s boost-use-ranges %t -check-suffixes=,CPP17 -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/
+// RUN: %check_clang_tidy -std=c++14 %s boost-use-ranges %t  -- -- -I %S/Inputs/use-ranges/
+// RUN: %check_clang_tidy -std=c++17-or-later %s boost-use-ranges %t -check-suffixes=,CPP17 -- -I %S/Inputs/use-ranges/
 
 // CHECK-FIXES: #include <boost/range/algorithm/find.hpp>
 // CHECK-FIXES: #include <boost/range/algorithm/reverse.hpp>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/boost/use-to-string.cpp b/clang-tools-extra/test/clang-tidy/checkers/boost/use-to-string.cpp
index 815c254e09a86..804d334f4a80b 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/boost/use-to-string.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/boost/use-to-string.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s boost-use-to-string %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s boost-use-to-string %t
 #include <string>
 
 namespace boost {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/argument-comment.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/argument-comment.cpp
index 5576bc5541d60..dd8221772a300 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/argument-comment.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/argument-comment.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-argument-comment %t -- -- -I %S/Inputs/argument-comment -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s bugprone-argument-comment %t -- -- -I %S/Inputs/argument-comment
 
 // FIXME: clang-tidy should provide a -verify mode to make writing these checks
 // easier and more accurate.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp
index e6da761aa9121..2467b3383b44a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp
@@ -1,14 +1,11 @@
 // RUN: %check_clang_tidy -std=c++11,c++14 -check-suffix=,CXX14 %s bugprone-dangling-handle %t -- \
 // RUN:   -config="{CheckOptions: \
 // RUN:             {bugprone-dangling-handle.HandleClasses: \
-// RUN:               'std::basic_string_view; ::llvm::StringRef;'}}" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:               'std::basic_string_view; ::llvm::StringRef;'}}"
 // RUN: %check_clang_tidy -std=c++17-or-later -check-suffix=,CXX17 %s bugprone-dangling-handle %t -- \
 // RUN:   -config="{CheckOptions: \
 // RUN:             {bugprone-dangling-handle.HandleClasses: \
-// RUN:               'std::basic_string_view; ::llvm::StringRef;'}}" \
-// RUN:   -- -isystem %clang_tidy_headers
+// RUN:               'std::basic_string_view; ::llvm::StringRef;'}}"
 #include <string>
 #include <vector>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-prefixsuffixname.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-prefixsuffixname.cpp
index fdcc461c45936..5d4047265ca0a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-prefixsuffixname.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-prefixsuffixname.cpp
@@ -7,7 +7,7 @@
 // RUN:     bugprone-easily-swappable-parameters.ModelImplicitConversions: 0, \
 // RUN:     bugprone-easily-swappable-parameters.SuppressParametersUsedTogether: 0, \
 // RUN:     bugprone-easily-swappable-parameters.NamePrefixSuffixSilenceDissimilarityThreshold: 1 \
-// RUN:  }}' -- -isystem %clang_tidy_headers
+// RUN:  }}'
 #include <string>
 
 class Matrix {};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-minimal.c b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-minimal.c
index 7030efd5dc3d9..c2ff5d405181f 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-minimal.c
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-minimal.c
@@ -1,8 +1,6 @@
 // RUN: %check_clang_tidy %s bugprone-signal-handler %t \
 // RUN: -config='{CheckOptions: \
-// RUN:  {bugprone-signal-handler.AsyncSafeFunctionSet: "minimal"}}' \
-// RUN: -- -isystem %clang_tidy_headers
-
+// RUN:  {bugprone-signal-handler.AsyncSafeFunctionSet: "minimal"}}'
 #include "signal.h"
 #include "stdlib.h"
 #include "string.h"
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-posix.c b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-posix.c
index 3e9b395a70474..d967a63433a7a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-posix.c
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-posix.c
@@ -1,8 +1,6 @@
 // RUN: %check_clang_tidy %s bugprone-signal-handler %t \
 // RUN: -config='{CheckOptions: \
-// RUN:  {bugprone-signal-handler.AsyncSafeFunctionSet: "POSIX"}}' \
-// RUN: -- -isystem %clang_tidy_headers
-
+// RUN:  {bugprone-signal-handler.AsyncSafeFunctionSet: "POSIX"}}'
 #include "signal.h"
 #include "stdlib.h"
 #include "stdio.h"
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.c b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.c
index a8f6f3bba20b9..aa51ba6bd476c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.c
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.c
@@ -1,5 +1,5 @@
-// RUN: %check_clang_tidy -std=c99,c11,c17 -check-suffixes=,BEFORE-23 %s bugprone-signal-handler %t -- -- -isystem %clang_tidy_headers
-// RUN: %check_clang_tidy -std=c23-or-later %s bugprone-signal-handler %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c99,c11,c17 -check-suffixes=,BEFORE-23 %s bugprone-signal-handler %t
+// RUN: %check_clang_tidy -std=c23-or-later %s bugprone-signal-handler %t
 
 #include "signal.h"
 #include "stdlib.h"
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp
index 8dcfb3330befe..6d369d2f3fddf 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++11,c++14 %s bugprone-signal-handler %t -- -- -isystem %clang_tidy_headers -isystem %S/Inputs/signal-handler -target x86_64-unknown-unknown
+// RUN: %check_clang_tidy -std=c++11,c++14 %s bugprone-signal-handler %t -- -- -isystem %S/Inputs/signal-handler -target x86_64-unknown-unknown
 // FIXME: Fix the checker to work in C++17 or later mode.
 #include "stdcpp.h"
 #include "stdio.h"
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-container.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-container.cpp
index 694cabc0d0375..fa35b48fb20ee 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-container.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-container.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-sizeof-container %t -- -- -isystem %clang_tidy_headers -target x86_64-unknown-unknown
+// RUN: %check_clang_tidy %s bugprone-sizeof-container %t -- -- -target x86_64-unknown-unknown
 #include <string>
 #include <vector>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/std-namespace-modification.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/std-namespace-modification.cpp
index f594e6948a9ad..63bd66cb66372 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/std-namespace-modification.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/std-namespace-modification.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-std-namespace-modification %t -- -- -I %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-std-namespace-modification %t
 
 #include "system-header-simulation.h"
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-constructor-options.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-constructor-options.cpp
index c414933f1fe82..90248373165f8 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-constructor-options.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-constructor-options.cpp
@@ -3,8 +3,7 @@
 // RUN:     bugprone-string-constructor.WarnOnLargeLength: true, \
 // RUN:     bugprone-string-constructor.LargeLengthThreshold: 10, \
 // RUN:     bugprone-string-constructor.StringNames: '::std::basic_string;::std::basic_string_view;::custom::String' \
-// RUN:   }}" -- -isystem %clang_tidy_headers
-
+// RUN:   }}"
 #include <string>
 
 namespace custom {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-integer-assignment.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-integer-assignment.cpp
index f5a4b079fa074..066917d62042e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-integer-assignment.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/string-integer-assignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-string-integer-assignment %t -- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s bugprone-string-integer-assignment %t -- -- -fno-delayed-template-parsing
 #include <string>
 
 namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-include.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-include.cpp
index 4f2acbc2fe7c9..b12b08ee3fd67 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-include.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-include.cpp
@@ -1,6 +1,6 @@
 // RUN: %check_clang_tidy %s bugprone-suspicious-include %t -- \
 // RUN:   -config="{CheckOptions: {bugprone-suspicious-include.IgnoredRegex: 'moc_.*'}"} -- \
-// RUN:   -isystem %clang_tidy_headers -fmodules
+// RUN:   -fmodules
 
 // clang-format off
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage-options.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage-options.cpp
index 64ec7432a9ddd..5c1a7f4341f80 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage-options.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage-options.cpp
@@ -2,7 +2,7 @@
 // RUN:   -config="{CheckOptions: { \
 // RUN:     bugprone-suspicious-stringview-data-usage.StringViewTypes: '::custom::StrView', \
 // RUN:     bugprone-suspicious-stringview-data-usage.AllowedCallees: '::safe_func;SafeClass' \
-// RUN:   }}" -- -isystem %clang_tidy_headers
+// RUN:   }}"
 #include <string>
 
 namespace custom {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage.cpp
index 8072d60a2f47a..f2182c109854a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-stringview-data-usage.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-suspicious-stringview-data-usage %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-suspicious-stringview-data-usage %t
 #include <string>
 
 struct View {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unchecked-optional-access.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unchecked-optional-access.cpp
index 4831374bda6db..214072de772e2 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unchecked-optional-access.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unchecked-optional-access.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-unchecked-optional-access %t -- -- -I %S/Inputs/unchecked-optional-access -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s bugprone-unchecked-optional-access %t -- -- -I %S/Inputs/unchecked-optional-access
 
 #include "absl/types/optional.h"
 #include "folly/types/Optional.h"
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-return-value.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-return-value.cpp
index 938f12a582fbe..7ecacabef1a0b 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-return-value.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-return-value.cpp
@@ -1,5 +1,5 @@
 // RUN: %check_clang_tidy %s bugprone-unused-return-value %t -- \
-// RUN:   --config="{CheckOptions: {bugprone-unused-return-value.AllowCastToVoid: true}}" -- -fexceptions -isystem %clang_tidy_headers
+// RUN:   --config="{CheckOptions: {bugprone-unused-return-value.AllowCastToVoid: true}}" -- -fexceptions
 #include <vector>
 
 namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp b/clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp
index 6d6d83d6cac49..44dadb7d5c797 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s cert-dcl16-c %t -- -- -I %clang_tidy_headers
+// RUN: %check_clang_tidy %s cert-dcl16-c %t
 
 #include "integral_constant.h"
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/google/objc-function-naming.m b/clang-tools-extra/test/clang-tidy/checkers/google/objc-function-naming.m
index 13d00a86b3c72..796e361b41f12 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/google/objc-function-naming.m
+++ b/clang-tools-extra/test/clang-tidy/checkers/google/objc-function-naming.m
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s google-objc-function-naming %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s google-objc-function-naming %t
 
 #include <stdio.h>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/llvm/include-order.cpp b/clang-tools-extra/test/clang-tidy/checkers/llvm/include-order.cpp
index 6e8c748a9950b..c7201edf84b05 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/llvm/include-order.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/llvm/include-order.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s llvm-include-order %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s llvm-include-order %t
 
 // CHECK-MESSAGES: [[@LINE+2]]:1: warning: #includes are not sorted properly
 #include "j.h"
diff --git a/clang-tools-extra/test/clang-tidy/checkers/llvm/use-ranges.cpp b/clang-tools-extra/test/clang-tidy/checkers/llvm/use-ranges.cpp
index 7be84f59b5a8c..85f397f487e6d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/llvm/use-ranges.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/llvm/use-ranges.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s llvm-use-ranges %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s llvm-use-ranges %t
 #include <vector>
 
 // Test that the header is included
diff --git a/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/stdio.h b/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/locale.h
similarity index 100%
rename from clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/stdio.h
rename to clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/locale.h
diff --git a/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/stdlib.h b/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/math.h
similarity index 100%
rename from clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/stdlib.h
rename to clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/math.h
diff --git a/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/string.h b/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/time.h
similarity index 100%
rename from clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/string.h
rename to clang-tools-extra/test/clang-tidy/checkers/llvmlibc/Inputs/system/time.h
diff --git a/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/restrict-system-libc-headers.cpp b/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/restrict-system-libc-headers.cpp
index cf27ccbd270cd..5b551748b9817 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/restrict-system-libc-headers.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/llvmlibc/restrict-system-libc-headers.cpp
@@ -2,12 +2,12 @@
 // RUN:   -- -- -isystem %S/Inputs/system \
 // RUN:   -resource-dir %S/Inputs/resource
 
-#include <stdio.h>
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include stdio.h not allowed
-#include <stdlib.h>
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include stdlib.h not allowed
-#include "string.h"
-// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include string.h not allowed
+#include <math.h>
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include math.h not allowed
+#include <time.h>
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include time.h not allowed
+#include "locale.h"
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include locale.h not allowed
 #include "stdatomic.h"
-#include <stddef.h>
+#include <stdatomic.h>
 // Compiler provided headers should not throw warnings.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-default-init.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-default-init.cpp
index 4556cdf445d29..50e7beda68a43 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-default-init.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-default-init.cpp
@@ -3,7 +3,7 @@
 // RUN:             {modernize-make-unique.IgnoreDefaultInitialization: \
 // RUN:              'false'}} \
 // RUN:             }" \
-// RUN:   -- -I %S/Inputs/smart-ptr -isystem %clang_tidy_headers
+// RUN:   -- -I %S/Inputs/smart-ptr
 
 #include "unique_ptr.h"
 #include <vector>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp
index 45d9d15315e95..7988bc41014fb 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-make-unique %t -- -- -I %S/Inputs/smart-ptr -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-make-unique %t -- -- -I %S/Inputs/smart-ptr
 
 #include "unique_ptr.h"
 #include <vector>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value-macro-header.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value-macro-header.cpp
index 384a86ded2ee8..e56c9bc87b3f1 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value-macro-header.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value-macro-header.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-pass-by-value %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s modernize-pass-by-value %t
 
 // CHECK-FIXES: #include <utility>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/replace-random-shuffle.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/replace-random-shuffle.cpp
index 5a9c8560da8ce..0d604db560f2d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/replace-random-shuffle.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/replace-random-shuffle.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-replace-random-shuffle %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s modernize-replace-random-shuffle %t
 #include <vector>
 
 //CHECK-FIXES: #include <random>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
index 42c01202055aa..0c0856dcc8719 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++11-or-later %s modernize-return-braced-init-list %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++11-or-later %s modernize-return-braced-init-list %t
 #include <vector>
 
 class Bar {};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/shrink-to-fit.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/shrink-to-fit.cpp
index fc27719bab12b..ebd567d4159de 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/shrink-to-fit.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/shrink-to-fit.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-shrink-to-fit %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s modernize-shrink-to-fit %t
 #include <vector>
 
 void f() {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp
index 5202eceb57fcd..61519ba4657a1 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp
@@ -1,8 +1,7 @@
 // RUN: %check_clang_tidy %s modernize-use-emplace %t -- \
 // RUN:   -config="{CheckOptions: \
 // RUN:             {modernize-use-emplace.IgnoreImplicitConstructors: \
-// RUN:                true}}" \
-// RUN:   -- -isystem %clang_tidy_headers
+// RUN:                true}}"
 #include <vector>
 
 void testInts() {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nodiscard.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nodiscard.cpp
index df17761c2e515..73ea4e46f76b6 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nodiscard.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nodiscard.cpp
@@ -1,6 +1,5 @@
 // RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-nodiscard %t -- \
-// RUN:   -config="{CheckOptions: {modernize-use-nodiscard.ReplacementString: 'NO_DISCARD'}}" \
-// RUN:   -- -isystem %clang_tidy_headers
+// RUN:   -config="{CheckOptions: {modernize-use-nodiscard.ReplacementString: 'NO_DISCARD'}}"
 #include <string>
 
 namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges-pipe.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges-pipe.cpp
index 826347ceee518..e71df75e926db 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges-pipe.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges-pipe.cpp
@@ -1,7 +1,7 @@
 // RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-ranges %t -check-suffixes=,PIPE \
 // RUN:   -config="{CheckOptions: { \
-// RUN:     modernize-use-ranges.UseReversePipe: true }}" -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/
-// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-ranges %t -check-suffixes=,NOPIPE  -- -isystem %clang_tidy_headers -I %S/Inputs/use-ranges/
+// RUN:     modernize-use-ranges.UseReversePipe: true }}" -- -I %S/Inputs/use-ranges/
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-ranges %t -check-suffixes=,NOPIPE  -- -I %S/Inputs/use-ranges/
 
 // CHECK-FIXES: #include <algorithm>
 // CHECK-FIXES: #include <ranges>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
index 6af58b778e10e..21e6c32720163 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
@@ -1,5 +1,5 @@
-// RUN: %check_clang_tidy -std=c++20 %s modernize-use-ranges %t -- -- -isystem %clang_tidy_headers -I %S/Inputs/
-// RUN: %check_clang_tidy -std=c++23-or-later %s modernize-use-ranges %t -check-suffixes=,CPP23 -- -isystem %clang_tidy_headers -I %S/Inputs/
+// RUN: %check_clang_tidy -std=c++20 %s modernize-use-ranges %t -- -- -I %S/Inputs/
+// RUN: %check_clang_tidy -std=c++23-or-later %s modernize-use-ranges %t -check-suffixes=,CPP23 -- -I %S/Inputs/
 
 // CHECK-FIXES: #include <algorithm>
 // CHECK-FIXES-CPP23: #include <numeric>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scope-lock-warn-on-using-and-typedef-false.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scope-lock-warn-on-using-and-typedef-false.cpp
index 77df845756530..2ada0799cafbe 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scope-lock-warn-on-using-and-typedef-false.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scope-lock-warn-on-using-and-typedef-false.cpp
@@ -1,6 +1,6 @@
 // RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t -- \
 // RUN:   -config="{CheckOptions: {modernize-use-scoped-lock.WarnOnUsingAndTypedef: false}}" \
-// RUN:   -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+// RUN:   -- -fno-delayed-template-parsing
 
 #include <mutex>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-no-crash.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-no-crash.cpp
index 587dbe2707873..bd1589ab90986 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-no-crash.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-no-crash.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later -expect-clang-tidy-error %s modernize-use-scoped-lock %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++17-or-later -expect-clang-tidy-error %s modernize-use-scoped-lock %t
 
 #include <mutex>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-warn-on-single-locks-false.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-warn-on-single-locks-false.cpp
index 7b30cdd75c801..503ebe1ebc7b2 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-warn-on-single-locks-false.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock-warn-on-single-locks-false.cpp
@@ -1,6 +1,6 @@
 // RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t -- \
 // RUN:   -config="{CheckOptions: {modernize-use-scoped-lock.WarnOnSingleLocks: false}}" \
-// RUN:   -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+// RUN:   -- -fno-delayed-template-parsing
 
 #include <mutex>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock.cpp
index 45eabdbece68c..e09c28f73a5df 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-scoped-lock.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t -- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t -- -- -fno-delayed-template-parsing
 
 #include <mutex>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-starts-ends-with.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-starts-ends-with.cpp
index 720cafc267774..65931feea107e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-starts-ends-with.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-starts-ends-with.cpp
@@ -1,6 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-starts-ends-with %t -- \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-starts-ends-with %t
 #include <string.h>
 #include <string>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-custom.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-custom.cpp
index 264b544ce0c03..e519e640d49a3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-custom.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-custom.cpp
@@ -5,17 +5,14 @@
 // RUN:              modernize-use-std-format.StrFormatLikeFunctions: '::strprintf; mynamespace::strprintf2; any_format_type_strprintf', \
 // RUN:              modernize-use-std-format.ReplacementFormatFunction: 'fmt::format', \
 // RUN:              modernize-use-std-format.FormatHeader: '<fmt/core.h>' \
-// RUN:            }}"                                                  \
-// RUN:   -- -isystem %clang_tidy_headers
+// RUN:            }}"
 // RUN: %check_clang_tidy -check-suffixes=,NOTSTRICT                    \
 // RUN:   -std=c++20-or-later %s modernize-use-std-format %t --                  \
 // RUN:   -config="{CheckOptions: {                                     \
 // RUN:              modernize-use-std-format.StrFormatLikeFunctions: '::strprintf; mynamespace::strprintf2; any_format_type_strprintf', \
 // RUN:              modernize-use-std-format.ReplacementFormatFunction: 'fmt::format', \
 // RUN:              modernize-use-std-format.FormatHeader: '<fmt/core.h>' \
-// RUN:            }}"                                                  \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:            }}"
 #include <cstdio>
 #include <string>
 // CHECK-FIXES: #include <fmt/core.h>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-fmt.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-fmt.cpp
index 0df44a9765d78..b63344ef081bd 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-fmt.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-fmt.cpp
@@ -4,9 +4,7 @@
 // RUN:              modernize-use-std-format.StrFormatLikeFunctions: 'fmt::sprintf', \
 // RUN:              modernize-use-std-format.ReplacementFormatFunction: 'fmt::format', \
 // RUN:              modernize-use-std-format.FormatHeader: '<fmt/core.h>' \
-// RUN:            }}" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:            }}"
 // CHECK-FIXES: #include <fmt/core.h>
 #include <string>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-member.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-member.cpp
index b4e1720e0a106..688acf92c9ce2 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-member.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format-member.cpp
@@ -4,9 +4,7 @@
 // RUN:               modernize-use-std-format.StrFormatLikeFunctions: 'MyClass::StrFormat', \
 // RUN:               modernize-use-std-format.ReplacementFormatFunction: 'format', \
 // RUN:             } \
-// RUN:            }" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:            }"
 #include <cstdio>
 #include <string.h>
 #include <string>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format.cpp
index 30a8c54f9f125..cc1426a6ed94d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format.cpp
@@ -1,13 +1,13 @@
 // RUN: %check_clang_tidy \
 // RUN:   -std=c++20-or-later %s modernize-use-std-format %t -- \
 // RUN:   -config="{CheckOptions: {modernize-use-std-format.StrictMode: true}}" \
-// RUN:   -- -isystem %clang_tidy_headers \
+// RUN:   -- \
 // RUN:      -DPRI_CMDLINE_MACRO="\"s\"" \
 // RUN:      -D__PRI_CMDLINE_MACRO="\"s\""
 // RUN: %check_clang_tidy \
 // RUN:   -std=c++20-or-later %s modernize-use-std-format %t -- \
 // RUN:   -config="{CheckOptions: {modernize-use-std-format.StrictMode: false}}" \
-// RUN:   -- -isystem %clang_tidy_headers \
+// RUN:   -- \
 // RUN:      -DPRI_CMDLINE_MACRO="\"s\"" \
 // RUN:      -D__PRI_CMDLINE_MACRO="\"s\""
 #include <string>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-absl.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-absl.cpp
index 46f509ce9e4ba..08aa76c3de413 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-absl.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-absl.cpp
@@ -1,12 +1,9 @@
 // RUN: %check_clang_tidy \
 // RUN:   -std=c++23-or-later %s modernize-use-std-print %t -- \
-// RUN:   -config="{CheckOptions: {modernize-use-std-print.StrictMode: true}}" \
-// RUN:   -- -isystem %clang_tidy_headers
+// RUN:   -config="{CheckOptions: {modernize-use-std-print.StrictMode: true}}"
 // RUN: %check_clang_tidy \
 // RUN:   -std=c++23-or-later %s modernize-use-std-print %t -- \
-// RUN:   -config="{CheckOptions: {modernize-use-std-print.StrictMode: false}}" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:   -config="{CheckOptions: {modernize-use-std-print.StrictMode: false}}"
 #include <cstdio>
 #include <string.h>
 #include <string>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-custom.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-custom.cpp
index 41a0e653dc9e9..a5e530f20c100 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-custom.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-custom.cpp
@@ -4,9 +4,7 @@
 // RUN:               modernize-use-std-print.PrintfLikeFunctions: 'unqualified_printf;::myprintf; mynamespace::myprintf2; any_format_type_printf; fmt::printf', \
 // RUN:               modernize-use-std-print.FprintfLikeFunctions: '::myfprintf; mynamespace::myfprintf2; any_format_type_fprintf; fmt::fprintf' \
 // RUN:             } \
-// RUN:            }" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:            }"
 #include <cstdio>
 #include <string>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-fmt.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-fmt.cpp
index 95ceb33889bfc..db80d3fa6abad 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-fmt.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-fmt.cpp
@@ -5,9 +5,7 @@
 // RUN:               modernize-use-std-print.ReplacementPrintlnFunction: 'fmt::println', \
 // RUN:               modernize-use-std-print.PrintHeader: '<fmt/core.h>' \
 // RUN:             } \
-// RUN:            }" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:            }"
 #include <cstdio>
 // CHECK-FIXES: #include <fmt/core.h>
 #include <string.h>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-member.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-member.cpp
index 1d1ac4b369bba..ccb0b7b37e573 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-member.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print-member.cpp
@@ -6,9 +6,7 @@
 // RUN:               modernize-use-std-print.ReplacementPrintFunction: 'print', \
 // RUN:               modernize-use-std-print.ReplacementPrintlnFunction: 'println', \
 // RUN:             } \
-// RUN:            }" \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN:            }"
 #include <cstdio>
 #include <string.h>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp
index 63972cc0fd25e..28dfe702fd9fd 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp
@@ -1,13 +1,13 @@
 // RUN: %check_clang_tidy -check-suffixes=,STRICT \
 // RUN:   -std=c++23-or-later %s modernize-use-std-print %t -- \
 // RUN:   -config="{CheckOptions: {modernize-use-std-print.StrictMode: true}}" \
-// RUN:   -- -isystem %clang_tidy_headers -fexceptions \
+// RUN:   -- -fexceptions \
 // RUN:      -DPRI_CMDLINE_MACRO="\"s\"" \
 // RUN:      -D__PRI_CMDLINE_MACRO="\"s\""
 // RUN: %check_clang_tidy -check-suffixes=,NOTSTRICT \
 // RUN:   -std=c++23-or-later %s modernize-use-std-print %t -- \
 // RUN:   -config="{CheckOptions: {modernize-use-std-print.StrictMode: false}}" \
-// RUN:   -- -isystem %clang_tidy_headers -fexceptions \
+// RUN:   -- -fexceptions \
 // RUN:      -DPRI_CMDLINE_MACRO="\"s\"" \
 // RUN:      -D__PRI_CMDLINE_MACRO="\"s\""
 #include <cstddef>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-custom-view.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-custom-view.cpp
index 42b56cace6201..ca6d1307c55eb 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-custom-view.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-custom-view.cpp
@@ -1,8 +1,6 @@
 // RUN: %check_clang_tidy \
 // RUN: -std=c++17-or-later %s modernize-use-string-view %t -- \
-// RUN: --config="{CheckOptions: {modernize-use-string-view.ReplacementStringViewClass: 'string=StringRef;u8string=U8StringRef'}}" \
-// RUN: -- -isystem %clang_tidy_headers
-
+// RUN: --config="{CheckOptions: {modernize-use-string-view.ReplacementStringViewClass: 'string=StringRef;u8string=U8StringRef'}}"
 #include <string>
 
 // ==========================================================
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-cxx20.cpp
index c8353f8c67561..cc04e9d4a68e3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-cxx20.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-cxx20.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-string-view %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-string-view %t
 
 #include <string>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-ignored.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-ignored.cpp
index 56f5e9ce33dda..e2cdd02f3623d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-ignored.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-ignored.cpp
@@ -1,8 +1,6 @@
 // RUN: %check_clang_tidy \
 // RUN: -std=c++17-or-later %s modernize-use-string-view %t -- \
-// RUN: --config="{CheckOptions: {modernize-use-string-view.IgnoredFunctions: 'GoodButIgnored;GoodTooButAlsoIgnored'}}" \
-// RUN: -- -isystem %clang_tidy_headers
-
+// RUN: --config="{CheckOptions: {modernize-use-string-view.IgnoredFunctions: 'GoodButIgnored;GoodTooButAlsoIgnored'}}"
 #include <string>
 
 // ==========================================================
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view.cpp
index 2a00a7200ee76..63656b4959bb3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view.cpp
@@ -1,7 +1,5 @@
 // RUN: %check_clang_tidy \
-// RUN: -std=c++17-or-later %s modernize-use-string-view %t -- \
-// RUN: -- -isystem %clang_tidy_headers
-
+// RUN: -std=c++17-or-later %s modernize-use-string-view %t
 #include <string>
 
 namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx14.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx14.cpp
index 60762304d2fc8..0e0c631fede70 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx14.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx14.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-use-trailing-return-type %t -- -- -fno-delayed-template-parsing -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-use-trailing-return-type %t -- -- -fno-delayed-template-parsing
 #include <string>
 #include <vector>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas.cpp
index d06048ae5ccf8..7570ca3008aeb 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas.cpp
@@ -1,15 +1,15 @@
 // RUN: %check_clang_tidy -check-suffix=ALL -std=c++11-or-later %s modernize-use-trailing-return-type %t --\
 // RUN:   -config="{CheckOptions: {modernize-use-trailing-return-type.TransformLambdas: all, \
 // RUN:                            modernize-use-trailing-return-type.TransformFunctions: false}}" \
-// RUN:   -- -fno-delayed-template-parsing -isystem %clang_tidy_headers
+// RUN:   -- -fno-delayed-template-parsing
 // RUN: %check_clang_tidy -check-suffix=NOAUTO -std=c++11-or-later %s modernize-use-trailing-return-type %t --\
 // RUN:   -config="{CheckOptions: {modernize-use-trailing-return-type.TransformLambdas: all_except_auto, \
 // RUN:                            modernize-use-trailing-return-type.TransformFunctions: false}}" \
-// RUN:   -- -fno-delayed-template-parsing -isystem %clang_tidy_headers
+// RUN:   -- -fno-delayed-template-parsing
 // RUN: %check_clang_tidy -check-suffix=NONE -std=c++11-or-later %s modernize-use-trailing-return-type %t --\
 // RUN:   -config="{CheckOptions: {modernize-use-trailing-return-type.TransformLambdas: none, \
 // RUN:                            modernize-use-trailing-return-type.TransformFunctions: true}}" \
-// RUN:   -- -fno-delayed-template-parsing -isystem %clang_tidy_headers
+// RUN:   -- -fno-delayed-template-parsing
 #include <string>
 #include <vector>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
index 669f1af32470b..36288358160f2 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
@@ -1,8 +1,8 @@
-// RUN: %check_clang_tidy %s performance-faster-string-find %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s performance-faster-string-find %t
 // RUN: %check_clang_tidy -check-suffix=CUSTOM %s performance-faster-string-find %t -- \
 // RUN:   -config="{CheckOptions: \
 // RUN:             {performance-faster-string-find.StringLikeClasses: \
-// RUN:                '::llvm::StringRef;'}}" -- -isystem %clang_tidy_headers
+// RUN:                '::llvm::StringRef;'}}"
 #include <string>
 
 namespace llvm {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation-strict.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation-strict.cpp
index 9b3dc11c585bf..2779d78b2a783 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation-strict.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation-strict.cpp
@@ -1,7 +1,5 @@
 // RUN: %check_clang_tidy %s performance-inefficient-string-concatenation %t -- \
-// RUN:   -config="{CheckOptions: {performance-inefficient-string-concatenation.StrictMode: true}}" -- \
-// RUN:   -isystem %clang_tidy_headers
-
+// RUN:   -config="{CheckOptions: {performance-inefficient-string-concatenation.StrictMode: true}}"
 #include <string>
 
 void f(std::string) {}
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation.cpp
index 6a6d5c27916a9..72080ed39e59b 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-string-concatenation.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s performance-inefficient-string-concatenation %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s performance-inefficient-string-concatenation %t
 #include <string>
 
 void f(std::string) {}
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp
index 00582845bbcff..deb13d00bbd70 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp
@@ -1,8 +1,7 @@
 // RUN: %check_clang_tidy %s performance-inefficient-vector-operation %t -- \
 // RUN: -format-style=llvm \
 // RUN: -config='{CheckOptions: \
-// RUN:  {performance-inefficient-vector-operation.EnableProto: true}}' \
-// RUN: -- -isystem %clang_tidy_headers
+// RUN:  {performance-inefficient-vector-operation.EnableProto: true}}'
 #include <vector>
 
 namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/move-constructor-init.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/move-constructor-init.cpp
index e37918eabc586..a2d1029d3ebe9 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/move-constructor-init.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/move-constructor-init.cpp
@@ -1,8 +1,6 @@
 // RUN: %check_clang_tidy %s performance-move-constructor-init,modernize-pass-by-value %t -- \
 // RUN: -config='{CheckOptions: \
-// RUN:  {modernize-pass-by-value.ValuesOnly: true}}' \
-// RUN: -- -isystem %clang_tidy_headers
-
+// RUN:  {modernize-pass-by-value.ValuesOnly: true}}'
 #include <s.h>
 
 // CHECK-FIXES: #include <utility>
@@ -31,8 +29,8 @@ struct D : B {
   D() : B() {}
   D(const D &RHS) : B(RHS) {}
   // CHECK-NOTES: :[[@LINE+3]]:16: warning: move constructor initializes base class by calling a copy constructor [performance-move-constructor-init]
-  // CHECK-NOTES: 26:3: note: copy constructor being called
-  // CHECK-NOTES: 27:3: note: candidate move constructor here
+  // CHECK-NOTES: 24:3: note: copy constructor being called
+  // CHECK-NOTES: 25:3: note: candidate move constructor here
   D(D &&RHS) : B(RHS) {}
 };
 
@@ -77,8 +75,8 @@ struct M {
   B Mem;
   // CHECK-NOTES: :[[@LINE+1]]:16: warning: move constructor initializes class member by calling a copy constructor [performance-move-constructor-init]
   M(M &&RHS) : Mem(RHS.Mem) {}
-  // CHECK-NOTES: 26:3: note: copy constructor being called
-  // CHECK-NOTES: 27:3: note: candidate move constructor here
+  // CHECK-NOTES: 24:3: note: copy constructor being called
+  // CHECK-NOTES: 25:3: note: candidate move constructor here
 };
 
 struct N {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions-cxx20.cpp
index 3b7883ec80a56..c207be6982a36 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions-cxx20.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions-cxx20.cpp
@@ -1,6 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20-or-later %s performance-string-view-conversions %t -- \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN: %check_clang_tidy -std=c++20-or-later %s performance-string-view-conversions %t
 #include <string>
 
 using namespace std::literals::string_literals;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions.cpp
index 63980e7849fb3..99d2a64a7d5d8 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions.cpp
@@ -1,6 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s performance-string-view-conversions %t -- \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN: %check_clang_tidy -std=c++17-or-later %s performance-string-view-conversions %t
 #include <string>
 
 using namespace std::literals::string_literals;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-includestyle.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-includestyle.cpp
index d5d99a9b6f018..aa68ec9868f80 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-includestyle.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-includestyle.cpp
@@ -1,6 +1,6 @@
 // RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- \
 // RUN:   -config="{CheckOptions: {performance-unnecessary-value-param.IncludeStyle: 'google' \
-// RUN: }}" -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+// RUN: }}" -- -fno-delayed-template-parsing
 
 // CHECK-FIXES: #include <utility>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp
index 327b676228a7f..40cceb5daaaf0 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- -- -fno-delayed-template-parsing
 
 // CHECK-FIXES: #include <utility>
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/container-contains.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/container-contains.cpp
index 1d848ab98e3ba..b4aed7b79a722 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/container-contains.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/container-contains.cpp
@@ -1,6 +1,4 @@
-// RUN: %check_clang_tidy %s readability-container-contains %t -- \
-// RUN:   -- -isystem %clang_tidy_headers
-
+// RUN: %check_clang_tidy %s readability-container-contains %t
 #include <string>
 
 // Some *very* simplified versions of `map` etc.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/container-data-pointer.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/container-data-pointer.cpp
index 004e429e53e6f..cac0cbc3de85d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/container-data-pointer.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/container-data-pointer.cpp
@@ -1,5 +1,5 @@
-// RUN: %check_clang_tidy -check-suffixes=,CLASSIC %s readability-container-data-pointer %t -- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
-// RUN: %check_clang_tidy -check-suffixes=,WITH-CONFIG %s readability-container-data-pointer %t -- -config="{CheckOptions: {readability-container-data-pointer.IgnoredContainers: '::std::basic_string'}}" -- -isystem %clang_tidy_headers -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -check-suffixes=,CLASSIC %s readability-container-data-pointer %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -check-suffixes=,WITH-CONFIG %s readability-container-data-pointer %t -- -config="{CheckOptions: {readability-container-data-pointer.IgnoredContainers: '::std::basic_string'}}" -- -fno-delayed-template-parsing
 
 #include <string>
 #include <vector>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp
index aacb74306edc7..4fab26b87aa14 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp
@@ -1,6 +1,6 @@
 // RUN: %check_clang_tidy -std=c++14-or-later %s readability-container-size-empty %t -- \
 // RUN: -config="{CheckOptions: {readability-container-size-empty.ExcludedComparisonTypes: '::std::array;::IgnoredDummyType'}}" \
-// RUN: -- -fno-delayed-template-parsing -isystem %clang_tidy_headers
+// RUN: -- -fno-delayed-template-parsing
 #include <string>
 
 namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/convert-member-functions-to-static-deducing-this.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/convert-member-functions-to-static-deducing-this.cpp
index 985701ac78b35..a6ca86dd7cefa 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/convert-member-functions-to-static-deducing-this.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/convert-member-functions-to-static-deducing-this.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++23-or-later %s readability-convert-member-functions-to-static %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++23-or-later %s readability-convert-member-functions-to-static %t
 #include <string>
 
 namespace std{
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return.cpp
index e987687a764cd..0902e7f0ef464 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s readability-else-after-return %t -- -- -isystem %clang_tidy_headers -fexceptions
+// RUN: %check_clang_tidy -std=c++17-or-later %s readability-else-after-return %t -- -- -fexceptions
 #include <string>
 
 struct my_exception {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp
index fd06a18ed6e0a..ee22f561fc864 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s readability-isolate-declaration %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++17-or-later %s readability-isolate-declaration %t
 #include <vector>
 
 template <typename T1, typename T2>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto-cxx20.cpp
index aa58236c82139..75e774f4bb6f8 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto-cxx20.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto-cxx20.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-qualified-auto %t -- -- -std=c++20 -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-qualified-auto %t -- -- -std=c++20
 #include <vector>
 
 std::vector<int> *getVec();
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto.cpp
index 2f23e10e10f7d..0926d0a8f1669 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/qualified-auto.cpp
@@ -1,13 +1,12 @@
 // RUN: %check_clang_tidy %s readability-qualified-auto %t \
 // RUN: -config='{CheckOptions: { \
 // RUN:   readability-qualified-auto.AllowedTypes: "[iI]terator$;my::ns::Ignored1;std::array<.*>::Ignored2;MyIgnoredPtr" \
-// RUN: }}' -- -isystem %clang_tidy_headers
+// RUN: }}'
 // RUN: %check_clang_tidy %s readability-qualified-auto %t \
 // RUN: -config='{CheckOptions: { \
 // RUN:   readability-qualified-auto.AllowedTypes: "[iI]terator$;my::ns::Ignored1;std::array<.*>::Ignored2;MyIgnoredPtr", \
 // RUN:   readability-qualified-auto.IgnoreAliasing: false \
-// RUN: }}' -check-suffix=ALIAS -- -isystem %clang_tidy_headers
-
+// RUN: }}' -check-suffix=ALIAS
 namespace typedefs {
 typedef int *MyPtr;
 typedef int &MyRef;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-smartptr-get.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-smartptr-get.cpp
index 4a840999cc654..2d88281eb8524 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-smartptr-get.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-smartptr-get.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-redundant-smartptr-get %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-redundant-smartptr-get %t
 #include <vector>
 
 #define NULL __null
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-format.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-format.cpp
index a2bbd1934355d..07832b78e1809 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-format.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-format.cpp
@@ -1,5 +1,5 @@
-// RUN: %check_clang_tidy -check-suffix=STDFORMAT -std=c++20 %s readability-redundant-string-cstr %t -- --  -isystem %clang_tidy_headers -DTEST_STDFORMAT
-// RUN: %check_clang_tidy -check-suffixes=STDFORMAT,STDPRINT -std=c++2b %s readability-redundant-string-cstr %t -- --  -isystem %clang_tidy_headers -DTEST_STDFORMAT -DTEST_STDPRINT
+// RUN: %check_clang_tidy -check-suffix=STDFORMAT -std=c++20 %s readability-redundant-string-cstr %t -- --  -DTEST_STDFORMAT
+// RUN: %check_clang_tidy -check-suffixes=STDFORMAT,STDPRINT -std=c++2b %s readability-redundant-string-cstr %t -- --  -DTEST_STDFORMAT -DTEST_STDPRINT
 #include <string>
 
 namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-function.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-function.cpp
index 57a70f78027f0..fd6d75f5963fe 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-function.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr-function.cpp
@@ -2,8 +2,7 @@
 // RUN:   -config="{CheckOptions: \
 // RUN:             {readability-redundant-string-cstr.StringParameterFunctions: \
 // RUN:              '::fmt::format; ::fmt::print; ::BaseLogger::operator(); ::BaseLogger::Log'} \
-// RUN:             }" \
-// RUN:   -- -isystem %clang_tidy_headers
+// RUN:             }"
 #include <string>
 
 namespace fmt {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp
index 0c393f2f125ea..a66d3591bf172 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-redundant-string-cstr %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-redundant-string-cstr %t
 #include <string>
 
 template <typename T>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-init.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-init.cpp
index 93334486e9da9..445a8983b03b9 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-init.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-init.cpp
@@ -2,7 +2,7 @@
 // RUN:   -config="{CheckOptions: \
 // RUN:             {readability-redundant-string-init.StringNames: \
 // RUN:                '::std::basic_string;::std::basic_string_view;our::TestString'} \
-// RUN:             }" -- -isystem %clang_tidy_headers
+// RUN:             }"
 #include <string>
 
 void f() {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/simplify-subscript-expr.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/simplify-subscript-expr.cpp
index a04521a7edd72..ca4a999367ccf 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/simplify-subscript-expr.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/simplify-subscript-expr.cpp
@@ -1,8 +1,7 @@
 // RUN: %check_clang_tidy %s readability-simplify-subscript-expr %t \
 // RUN: -config="{CheckOptions: \
 // RUN: {readability-simplify-subscript-expr.Types: \
-// RUN:    '::std::basic_string;::std::basic_string_view;MyVector'}}" \
-// RUN: -- -isystem %clang_tidy_headers
+// RUN:    '::std::basic_string;::std::basic_string_view;MyVector'}}"
 #include <string>
 
 template <class T>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare-custom-string-classes.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare-custom-string-classes.cpp
index faf135833ee15..e65819100e0a2 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare-custom-string-classes.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare-custom-string-classes.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-string-compare %t -- -config='{CheckOptions: {readability-string-compare.StringLikeClasses: "CustomStringTemplateBase;CustomStringNonTemplateBase"}}' -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-string-compare %t -- -config='{CheckOptions: {readability-string-compare.StringLikeClasses: "CustomStringTemplateBase;CustomStringNonTemplateBase"}}'
 #include <string>
 
 struct CustomStringNonTemplateBase {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare.cpp
index c4fea4341617b..17c6288843716 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/string-compare.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-string-compare %t -- -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-string-compare %t
 #include <string>
 
 void func(bool b);
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-cxx23.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-cxx23.cpp
index 6602fd92d6b5e..141777d456309 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-cxx23.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-cxx23.cpp
@@ -4,7 +4,7 @@
 //    3. Deleting this message.
 // These suffixes may be relevant to C too: https://github.com/llvm/llvm-project/issues/97335
 
-// RUN: %check_clang_tidy -std=c++23-or-later %s readability-uppercase-literal-suffix %t -- -- -target aarch64-linux-gnu -I %clang_tidy_headers
+// RUN: %check_clang_tidy -std=c++23-or-later %s readability-uppercase-literal-suffix %t -- -- -target aarch64-linux-gnu
 
 #include "integral_constant.h"
 #include <cstddef>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-floating-point.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-floating-point.cpp
index 07c741c4c7afc..96ba2fbb52c29 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-floating-point.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-floating-point.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -- -target x86_64-pc-linux-gnu -I %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -- -target x86_64-pc-linux-gnu
 
 #include "integral_constant.h"
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-hexadecimal-floating-point.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-hexadecimal-floating-point.cpp
index 9bb1cee4bbdff..84d25ad380233 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-hexadecimal-floating-point.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-hexadecimal-floating-point.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -- -target x86_64-pc-linux-gnu -I %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -- -target x86_64-pc-linux-gnu
 
 #include "integral_constant.h"
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-custom-list.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-custom-list.cpp
index 399afa5cf445c..a4a2094590640 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-custom-list.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-custom-list.cpp
@@ -1,5 +1,4 @@
-// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -config="{CheckOptions: {readability-uppercase-literal-suffix.NewSuffixes: 'L;uL'}}" -- -I %clang_tidy_headers
-
+// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -config="{CheckOptions: {readability-uppercase-literal-suffix.NewSuffixes: 'L;uL'}}"
 #include "integral_constant.h"
 
 void integer_suffix() {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-ms.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-ms.cpp
index 74628188b15ad..0b718bb6b2c9c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-ms.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer-ms.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -- -target x86_64-pc-linux-gnu -I %clang_tidy_headers -fms-extensions
+// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -- -target x86_64-pc-linux-gnu -fms-extensions
 
 #include "integral_constant.h"
 
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer.cpp
index fd5e4a529d99c..88d4303229a5a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- -- -I %clang_tidy_headers
+// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t
 
 #include "integral_constant.h"
 #include <cstddef>



More information about the cfe-commits mailing list