[clang] [clang-tools-extra] Draft, do not review (PR #164156)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 19 03:39:44 PDT 2025
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/164156
>From 5a22a1db87a1d45ef95e33944a87a101769fe8e2 Mon Sep 17 00:00:00 2001
From: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: Sun, 19 Oct 2025 00:46:03 -0700
Subject: [PATCH 1/5] [clang][Sema] Attempt to parse delayed templates at the
end of the TU
---
clang/lib/Sema/Sema.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 39fa25f66f3b7..8e0ad9325e2af 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1251,6 +1251,17 @@ void Sema::ActOnEndOfTranslationUnit() {
if (LateTemplateParserCleanup)
LateTemplateParserCleanup(OpaqueParser);
+ if (LangOpts.DelayedTemplateParsing) {
+ // Try to parse any templates that have been delayed and never
+ // instantiated so that their bodies are available for static
+ // analysis tools to analyze.
+ Diags.setSuppressAllDiagnostics(true);
+ for (auto &[Decl, Template] : LateParsedTemplateMap)
+ if (Decl->isLateTemplateParsed())
+ LateTemplateParser(OpaqueParser, *Template);
+ Diags.setSuppressAllDiagnostics(false);
+ }
+
CheckDelayedMemberExceptionSpecs();
} else {
// If we are building a TU prefix for serialization, it is safe to transfer
>From 29502017417e78599fbb92526e166a5f5457b583 Mon Sep 17 00:00:00 2001
From: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: Sun, 19 Oct 2025 00:46:26 -0700
Subject: [PATCH 2/5] Fix clang-tidy tests that break
---
.../cppcoreguidelines/pro-type-member-init-delayed.cpp | 9 ---------
.../checkers/modernize/use-equals-default-delayed.cpp | 9 ---------
2 files changed, 18 deletions(-)
delete mode 100644 clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-delayed.cpp
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp
index d3436ba6c1211..93bf4993f7b8b 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp
@@ -21,12 +21,3 @@ struct PositiveFieldAfterConstructor {
};
// Explicit instantiation.
template class PositiveFieldAfterConstructor<int>;
-
-// This declaration isn't used and won't be parsed 'delayed-template-parsing'.
-// The body of the declaration is 'null' and may cause crash if not handled
-// properly by checkers.
-template <class T>
-struct UnusedDelayedConstructor {
- UnusedDelayedConstructor() {}
- int F;
-};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-delayed.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-delayed.cpp
deleted file mode 100644
index f39efd8452f79..0000000000000
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-delayed.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: clang-tidy %s -checks=-*,modernize-use-equals-default -- -std=c++11 -fdelayed-template-parsing -fexceptions | count 0
-// Note: this test expects no diagnostics, but FileCheck cannot handle that,
-// hence the use of | count 0.
-// FIXME: Make the test work in all language modes.
-
-template <typename Ty>
-struct S {
- S<Ty>& operator=(const S<Ty>&) { return *this; }
-};
>From 9e2f12d65baf460dcb9850fc171bcf5091c363b7 Mon Sep 17 00:00:00 2001
From: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: Sun, 19 Oct 2025 02:36:34 -0700
Subject: [PATCH 3/5] Migrate clang-tidy tests away from
`-fno-delayed-template-parsing`
---
.../clang-tidy/checkers/bugprone/branch-clone.cpp | 2 +-
.../bugprone/crtp-constructor-accessibility.cpp | 2 +-
.../clang-tidy/checkers/bugprone/infinite-loop.cpp | 2 +-
.../bugprone/move-forwarding-reference.cpp | 2 +-
.../bugprone/return-const-ref-from-parameter.cpp | 2 +-
.../checkers/bugprone/sizeof-expression.cpp | 3 +--
.../bugprone/string-integer-assignment.cpp | 2 +-
.../bugprone/switch-missing-default-case.cpp | 2 +-
.../bugprone/unhandled-self-assignment.cpp | 2 +-
.../clang-tidy/checkers/bugprone/unused-raii.cpp | 2 +-
.../checkers/bugprone/use-after-move.cpp | 4 ++--
.../checkers/cppcoreguidelines/init-variables.cpp | 2 +-
.../missing-std-forward-custom-function.cpp | 2 +-
.../cppcoreguidelines/missing-std-forward.cpp | 2 +-
.../cppcoreguidelines/no-suspend-with-lock.cpp | 2 +-
.../pro-type-member-init-cxx20.cpp | 2 +-
.../pro-type-member-init-cxx98.cpp | 2 +-
.../pro-type-member-init-delayed.cpp | 2 +-
.../cppcoreguidelines/pro-type-member-init.cpp | 2 +-
...e-reference-param-not-moved-custom-function.cpp | 2 +-
.../rvalue-reference-param-not-moved.cpp | 10 +++++-----
.../prefer-static-over-anonymous-namespace.cpp | 6 +++---
.../misc/const-correctness-allowed-types.cpp | 2 +-
.../checkers/misc/const-correctness-cxx17.cpp | 2 +-
...onst-correctness-pointer-as-pointers-values.cpp | 3 +--
.../misc/const-correctness-pointer-as-pointers.cpp | 3 +--
.../misc/const-correctness-pointer-as-values.cpp | 3 +--
.../checkers/misc/const-correctness-templates.cpp | 2 +-
...nst-correctness-transform-pointer-as-values.cpp | 2 +-
.../misc/const-correctness-transform-values.cpp | 2 +-
.../checkers/misc/const-correctness-unaligned.cpp | 2 +-
.../misc/const-correctness-values-before-cxx23.cpp | 2 +-
.../checkers/misc/const-correctness-values.cpp | 2 +-
.../misc/const-correctness-wrong-config.cpp | 2 +-
.../checkers/misc/include-cleaner-wrong-config.cpp | 2 +-
.../misc/unconventional-assign-operator-cxx17.cpp | 2 +-
.../misc/unconventional-assign-operator.cpp | 2 +-
.../clang-tidy/checkers/misc/unused-parameters.cpp | 2 +-
.../checkers/misc/unused-using-decls-cxx17.cpp | 2 +-
.../checkers/misc/unused-using-decls.cpp | 2 +-
.../checkers/modernize/macro-to-enum.cpp | 2 +-
.../checkers/modernize/pass-by-value.cpp | 2 +-
.../modernize/redundant-void-arg-delayed.cpp | 3 +--
.../use-constraints-first-greatergreater.cpp | 2 +-
.../checkers/modernize/use-constraints.cpp | 2 +-
.../modernize/use-designated-initializers.cpp | 13 ++++---------
.../checkers/modernize/use-equals-default-copy.cpp | 2 +-
.../modernize/use-equals-default-cxx17.cpp | 2 +-
.../modernize/use-equals-default-cxx20.cpp | 2 +-
.../checkers/modernize/use-equals-default.cpp | 2 +-
.../checkers/modernize/use-nullptr-basic.cpp | 2 +-
...-scope-lock-warn-on-using-and-typedef-false.cpp | 2 +-
.../use-scoped-lock-warn-on-single-locks-false.cpp | 2 +-
.../checkers/modernize/use-scoped-lock.cpp | 2 +-
...railing-return-type-transform-lambdas-cxx14.cpp | 2 +-
...railing-return-type-transform-lambdas-cxx20.cpp | 2 +-
.../use-trailing-return-type-transform-lambdas.cpp | 9 +++------
.../clang-tidy/checkers/modernize/use-using.cpp | 2 +-
.../performance/for-range-copy-allowed-types.cpp | 3 +--
.../checkers/performance/for-range-copy.cpp | 2 +-
.../unnecessary-value-param-delayed.cpp | 2 +-
.../performance/unnecessary-value-param.cpp | 2 +-
.../checkers/portability/std-allocator-const.cpp | 2 +-
.../readability/container-data-pointer.cpp | 4 ++--
.../readability/container-size-empty-cxx20.cpp | 2 +-
.../checkers/readability/container-size-empty.cpp | 2 +-
.../checkers/readability/delete-null-pointer.cpp | 2 +-
.../identifier-naming-member-decl-usage.cpp | 2 +-
.../checkers/readability/identifier-naming.cpp | 2 +-
.../inconsistent-declaration-parameter-name.cpp | 2 +-
.../readability/misleading-indentation-cpp17.cpp | 2 +-
.../readability/misleading-indentation.cpp | 2 +-
.../checkers/readability/redundant-casting.cpp | 14 ++++++--------
.../checkers/readability/use-std-min-max.cpp | 2 +-
74 files changed, 92 insertions(+), 108 deletions(-)
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone.cpp
index 42231746149f2..1a8d0363f9b50 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-branch-clone %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s bugprone-branch-clone %t
void test_basic1(int in, int &out) {
if (in > 77)
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/crtp-constructor-accessibility.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/crtp-constructor-accessibility.cpp
index 44cfcd136f238..537549f76cbfb 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/crtp-constructor-accessibility.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/crtp-constructor-accessibility.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-crtp-constructor-accessibility %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-crtp-constructor-accessibility %t
namespace class_implicit_ctor {
template <typename T>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/infinite-loop.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/infinite-loop.cpp
index 9a58a7ae2f2ab..ff320f4fbdf85 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/infinite-loop.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/infinite-loop.cpp
@@ -1,5 +1,5 @@
// RUN: %check_clang_tidy %s bugprone-infinite-loop %t \
-// RUN: -- -- -fexceptions -fblocks -fno-delayed-template-parsing
+// RUN: -- -- -fexceptions -fblocks
void simple_infinite_loop1() {
int i = 0;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/move-forwarding-reference.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/move-forwarding-reference.cpp
index 9f453678d1d19..c12a29ba0bac7 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/move-forwarding-reference.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/move-forwarding-reference.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++14-or-later %s bugprone-move-forwarding-reference %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++14-or-later %s bugprone-move-forwarding-reference %t
namespace std {
template <typename> struct remove_reference;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/return-const-ref-from-parameter.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/return-const-ref-from-parameter.cpp
index a3297ca0f8084..1e9d4f587e78f 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/return-const-ref-from-parameter.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/return-const-ref-from-parameter.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-return-const-ref-from-parameter %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s bugprone-return-const-ref-from-parameter %t
using T = int;
using TConst = int const;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp
index e47f8b06f83c9..e04390688c10a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp
@@ -1,6 +1,5 @@
// RUN: %check_clang_tidy %s bugprone-sizeof-expression %t \
-// RUN: -- -config="{CheckOptions: {bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression: true}}" \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: -- -config="{CheckOptions: {bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression: true}}"
class C {
int size() { return sizeof(this); }
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 e127788bf6ca6..aa05a80f4c68e 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 -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s bugprone-string-integer-assignment %t
namespace std {
template<typename T>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/switch-missing-default-case.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/switch-missing-default-case.cpp
index 14e83c8207fdd..88415f7472bcd 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/switch-missing-default-case.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/switch-missing-default-case.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-switch-missing-default-case %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s bugprone-switch-missing-default-case %t
typedef int MyInt;
enum EnumType { eE2 };
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-self-assignment.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-self-assignment.cpp
index c2a8ddc08d330..3503ee1ccdd7e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-self-assignment.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unhandled-self-assignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-unhandled-self-assignment %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s bugprone-unhandled-self-assignment %t
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-raii.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-raii.cpp
index 1b285768fdb33..be2d757b5fb60 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-raii.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-raii.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s bugprone-unused-raii %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s bugprone-unused-raii %t
struct Foo {
Foo();
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp
index 87dfec4f68061..701ad6f93afec 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp
@@ -1,5 +1,5 @@
-// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX11 %s bugprone-use-after-move %t -- -- -fno-delayed-template-parsing
-// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-use-after-move %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX11 %s bugprone-use-after-move %t
+// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-use-after-move %t
typedef decltype(nullptr) nullptr_t;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/init-variables.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/init-variables.cpp
index 8a8973a032bf2..540e2a23349bf 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/init-variables.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/init-variables.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s cppcoreguidelines-init-variables -fix-errors %t -- -- -fno-delayed-template-parsing -fexceptions
+// RUN: %check_clang_tidy %s cppcoreguidelines-init-variables -fix-errors %t -- -- -fexceptions
// CHECK-FIXES: #include <math.h>
// Ensure that function declarations are not changed.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-custom-function.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-custom-function.cpp
index 7ccac1a10015f..3c853a0d2a4d9 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-custom-function.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-custom-function.cpp
@@ -1,5 +1,5 @@
// RUN: %check_clang_tidy -std=c++14 %s cppcoreguidelines-missing-std-forward %t -- \
-// RUN: -config="{CheckOptions: {cppcoreguidelines-missing-std-forward.ForwardFunction: custom_forward}}" -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {cppcoreguidelines-missing-std-forward.ForwardFunction: custom_forward}}"
// NOLINTBEGIN
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp
index 98c592db7ce22..84056a2f6e453 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s cppcoreguidelines-missing-std-forward %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s cppcoreguidelines-missing-std-forward %t
// NOLINTBEGIN
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/no-suspend-with-lock.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/no-suspend-with-lock.cpp
index a6e0cd778c40c..5faec7cd58b7f 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/no-suspend-with-lock.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/no-suspend-with-lock.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-no-suspend-with-lock %t -- -- -fno-delayed-template-parsing -fexceptions
+// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-no-suspend-with-lock %t -- -- -fexceptions
// NOLINTBEGIN
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx20.cpp
index 185591f40a1a2..7c6e7fccd4574 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx20.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx20.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-pro-type-member-init %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-pro-type-member-init %t
struct PositiveBitfieldMember {
PositiveBitfieldMember() {}
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx98.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx98.cpp
index 6e47123568f45..0714bc469ce2c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx98.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-cxx98.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++98 %s cppcoreguidelines-pro-type-member-init %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++98 %s cppcoreguidelines-pro-type-member-init %t
struct PositiveFieldBeforeConstructor {
int F;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp
index 93bf4993f7b8b..0cd713065f30e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init-delayed.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-member-init %t -- -- -fdelayed-template-parsing
+// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-member-init %t
template <class T>
struct PositiveFieldBeforeConstructor {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init.cpp
index 890d1d262066b..8efe391b4a3d5 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++11,c++14,c++17 %s cppcoreguidelines-pro-type-member-init %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++11,c++14,c++17 %s cppcoreguidelines-pro-type-member-init %t
// FIXME: Fix the checker to work in C++20 mode.
struct PositiveFieldBeforeConstructor {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved-custom-function.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved-custom-function.cpp
index 4ed29824496fc..c1f469b4d5ac5 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved-custom-function.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved-custom-function.cpp
@@ -1,5 +1,5 @@
// RUN: %check_clang_tidy -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
-// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true, cppcoreguidelines-rvalue-reference-param-not-moved.MoveFunction: custom_move}}" -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true, cppcoreguidelines-rvalue-reference-param-not-moved.MoveFunction: custom_move}}"
// NOLINTBEGIN
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp
index e996690102dff..2bcfc12c4ce9c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp
@@ -1,13 +1,13 @@
// RUN: %check_clang_tidy -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
-// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,CXX14 -std=c++14 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
-// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,NOSUBEXPR -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
-// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,UNNAMED -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
-// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,NONDEDUCED -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
-// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: false}}" -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: false}}"
// NOLINTBEGIN
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/llvm/prefer-static-over-anonymous-namespace.cpp b/clang-tools-extra/test/clang-tidy/checkers/llvm/prefer-static-over-anonymous-namespace.cpp
index 71dce6ea4f01c..9b781fd701d70 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/llvm/prefer-static-over-anonymous-namespace.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/llvm/prefer-static-over-anonymous-namespace.cpp
@@ -1,12 +1,12 @@
-// RUN: %check_clang_tidy %s llvm-prefer-static-over-anonymous-namespace %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s llvm-prefer-static-over-anonymous-namespace %t
// RUN: %check_clang_tidy -check-suffixes=,VAR %s llvm-prefer-static-over-anonymous-namespace %t -- \
// RUN: -config="{CheckOptions: { \
// RUN: llvm-prefer-static-over-anonymous-namespace.AllowVariableDeclarations: false }, \
-// RUN: }" -- -fno-delayed-template-parsing
+// RUN: }"
// RUN: %check_clang_tidy -check-suffixes=,MEM %s llvm-prefer-static-over-anonymous-namespace %t -- \
// RUN: -config="{CheckOptions: { \
// RUN: llvm-prefer-static-over-anonymous-namespace.AllowMemberFunctionsInClass: false }, \
-// RUN: }" -- -fno-delayed-template-parsing
+// RUN: }"
namespace {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-allowed-types.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-allowed-types.cpp
index 1ef36b16a3e4a..70fea55ca4415 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-allowed-types.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-allowed-types.cpp
@@ -5,7 +5,7 @@
// RUN: misc-const-correctness.TransformReferences: true, \
// RUN: misc-const-correctness.WarnPointersAsValues: true, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false } \
-// RUN: }" -- -fno-delayed-template-parsing
+// RUN: }"
struct SmartPointer {
};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-cxx17.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-cxx17.cpp
index f17c9ce2060f1..d9578f2ab9f7d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-cxx17.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-cxx17.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-const-correctness %t -- -- -std=c++17 -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s misc-const-correctness %t -- -- -std=c++17
template <typename L, typename R>
struct MyPair {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers-values.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers-values.cpp
index 0401caaf1a515..5f35a9b9cfcbb 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers-values.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers-values.cpp
@@ -7,8 +7,7 @@
// RUN: misc-const-correctness.WarnPointersAsPointers: true,\
// RUN: misc-const-correctness.TransformPointersAsValues: true,\
// RUN: misc-const-correctness.TransformPointersAsPointers: true\
-// RUN: }}' \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: }}'
void pointee_to_const() {
int a[] = {1, 2};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers.cpp
index e20680ceeefa5..c7fa02dcd59f6 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers.cpp
@@ -7,8 +7,7 @@
// RUN: misc-const-correctness.WarnPointersAsPointers: true,\
// RUN: misc-const-correctness.TransformPointersAsValues: false,\
// RUN: misc-const-correctness.TransformPointersAsPointers: true\
-// RUN: }}' \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: }}'
void pointee_to_const() {
int a[] = {1, 2};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-values.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-values.cpp
index 02d32c0ec73e5..f6a0781a579c9 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-values.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-values.cpp
@@ -3,8 +3,7 @@
// RUN: {misc-const-correctness.AnalyzeValues: true,\
// RUN: misc-const-correctness.WarnPointersAsValues: true,\
// RUN: misc-const-correctness.WarnPointersAsPointers: false,\
-// RUN: misc-const-correctness.TransformPointersAsValues: true}}' \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: misc-const-correctness.TransformPointersAsValues: true}}'
void potential_const_pointer() {
double np_local0[10] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9.};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-templates.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-templates.cpp
index 5a890f212a603..fdcbad9db832e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-templates.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-templates.cpp
@@ -4,7 +4,7 @@
// RUN: misc-const-correctness.TransformReferences: true, \
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false} \
-// RUN: }" -- -fno-delayed-template-parsing
+// RUN: }"
template <typename T>
void type_dependent_variables() {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-pointer-as-values.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-pointer-as-values.cpp
index 22e565180deaf..c19712b447baa 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-pointer-as-values.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-pointer-as-values.cpp
@@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: true, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: true}\
-// RUN: }' -- -fno-delayed-template-parsing
+// RUN: }'
void potential_const_pointer() {
double np_local0[10] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9.};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-values.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-values.cpp
index 190d8ecec4c59..fd2071e4e1e51 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-values.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-values.cpp
@@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false} \
-// RUN: }" -- -fno-delayed-template-parsing
+// RUN: }"
bool global;
char np_global = 0; // globals can't be known to be const
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-unaligned.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-unaligned.cpp
index 69139efa69549..f0c6e49cebc4c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-unaligned.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-unaligned.cpp
@@ -3,7 +3,7 @@
// RUN: misc-const-correctness.TransformValues: true, \
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false} \
-// RUN: }" -- -fno-delayed-template-parsing -fms-extensions
+// RUN: }" -- -fms-extensions
struct S {};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values-before-cxx23.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values-before-cxx23.cpp
index 89856974eafc4..1708ab2e3ab98 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values-before-cxx23.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values-before-cxx23.cpp
@@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false \
-// RUN: }}" -- -fno-delayed-template-parsing
+// RUN: }}"
double &non_const_ref_return() {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values.cpp
index 4cef7f4ce116e..2c5f2af86b82e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values.cpp
@@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false \
-// RUN: }}" -- -fno-delayed-template-parsing -fexceptions
+// RUN: }}" -- -fexceptions
// ------- Provide test samples for primitive builtins ---------
// - every 'p_*' variable is a 'potential_const_*' variable
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-wrong-config.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-wrong-config.cpp
index c0ef160c4562d..66e5dbf69ffc3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-wrong-config.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-wrong-config.cpp
@@ -3,7 +3,7 @@
// RUN: {"misc-const-correctness.AnalyzeValues": false,\
// RUN: "misc-const-correctness.AnalyzeReferences": false,\
// RUN: "misc-const-correctness.AnalyzePointers": false\
-// RUN: }}' -- -fno-delayed-template-parsing
+// RUN: }}'
// CHECK-MESSAGES: warning: The check 'misc-const-correctness' will not perform any analysis because 'AnalyzeValues', 'AnalyzeReferences' and 'AnalyzePointers' are false. [clang-tidy-config]
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/include-cleaner-wrong-config.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/include-cleaner-wrong-config.cpp
index fdcb811707241..2bc5e0f079fc8 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/include-cleaner-wrong-config.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/include-cleaner-wrong-config.cpp
@@ -2,7 +2,7 @@
// RUN: -config='{CheckOptions: \
// RUN: {"misc-include-cleaner.UnusedIncludes": false,\
// RUN: "misc-include-cleaner.MissingIncludes": false,\
-// RUN: }}' -- -I%S/Inputs -isystem%S/Inputs/system -fno-delayed-template-parsing
+// RUN: }}' -- -I%S/Inputs -isystem%S/Inputs/system
// CHECK-MESSAGES: warning: The check 'misc-include-cleaner' will not perform any analysis because 'UnusedIncludes' and 'MissingIncludes' are both false. [clang-tidy-config]
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator-cxx17.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator-cxx17.cpp
index d6e9ebe49a977..5e74a457920c5 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator-cxx17.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator-cxx17.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++14-or-later %s misc-unconventional-assign-operator %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++14-or-later %s misc-unconventional-assign-operator %t
struct BadModifier {
BadModifier& operator=(const BadModifier&) const;
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator.cpp
index d7a5797cc2844..8d687d9d93212 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-unconventional-assign-operator %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s misc-unconventional-assign-operator %t
namespace std {
template <typename T>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/unused-parameters.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/unused-parameters.cpp
index f473f26a48e8c..b3cddda13679d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/unused-parameters.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/unused-parameters.cpp
@@ -1,7 +1,7 @@
// RUN: mkdir -p %t.dir
// RUN: echo "static void staticFunctionHeader(int i) {;}" > %t.dir/header.h
// RUN: echo "static void staticFunctionHeader(int /*i*/) {;}" > %t.dir/header-fixed.h
-// RUN: %check_clang_tidy -std=c++11 %s misc-unused-parameters %t.dir/code -- -header-filter='.*' -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++11 %s misc-unused-parameters %t.dir/code -- -header-filter='.*'
// RUN: diff %t.dir/header.h %t.dir/header-fixed.h
// FIXME: Make the test work in all language modes.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls-cxx17.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls-cxx17.cpp
index ac11218ec82a8..41febcf9c7056 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls-cxx17.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls-cxx17.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s misc-unused-using-decls %t -- --fix-notes -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++17-or-later %s misc-unused-using-decls %t -- --fix-notes
namespace ns {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls.cpp
index f6fd321a613dc..4e51212c6cd5f 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s misc-unused-using-decls %t -- --fix-notes -- -fno-delayed-template-parsing -isystem %S/Inputs
+// RUN: %check_clang_tidy %s misc-unused-using-decls %t -- --fix-notes -- -isystem %S/Inputs
// ----- Definitions -----
template <typename T> class vector {};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum.cpp
index e2df29d2d163e..ae8dd5438fa1e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-macro-to-enum %t -- -- -I%S/Inputs/macro-to-enum -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-macro-to-enum %t -- -- -I%S/Inputs/macro-to-enum
// C++14 or later required for binary literals.
#if 1
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value.cpp
index cc237f4efcd96..c55dd405f82b5 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-pass-by-value %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s modernize-pass-by-value %t
namespace {
// POD types are trivially move constructible.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg-delayed.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg-delayed.cpp
index 4e05ada1d2992..9a5d4a027b184 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg-delayed.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg-delayed.cpp
@@ -1,5 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-redundant-void-arg %t -- -- -fdelayed-template-parsing
-
+// RUN: %check_clang_tidy %s modernize-redundant-void-arg %t
int foo(void) {
// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: redundant void argument list in function definition [modernize-redundant-void-arg]
// CHECK-FIXES: int foo() {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints-first-greatergreater.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints-first-greatergreater.cpp
index b92e9093c97ee..b44f7b7e53af3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints-first-greatergreater.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints-first-greatergreater.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20 %s modernize-use-constraints %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++20 %s modernize-use-constraints %t
// NOLINTBEGIN
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints.cpp
index ecae36165e05e..def23da46a9e4 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-constraints.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-constraints %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-constraints %t
// NOLINTBEGIN
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-designated-initializers.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-designated-initializers.cpp
index 88e06361c0c11..3cfab1bc7f401 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-designated-initializers.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-designated-initializers.cpp
@@ -1,15 +1,10 @@
-// RUN: %check_clang_tidy -std=c++20 %s modernize-use-designated-initializers %t \
-// RUN: -- \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++20 %s modernize-use-designated-initializers %t
// RUN: %check_clang_tidy -check-suffixes=,SINGLE-ELEMENT -std=c++20 %s modernize-use-designated-initializers %t \
-// RUN: -- -config="{CheckOptions: {modernize-use-designated-initializers.IgnoreSingleElementAggregates: false}}" \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: -- -config="{CheckOptions: {modernize-use-designated-initializers.IgnoreSingleElementAggregates: false}}"
// RUN: %check_clang_tidy -check-suffixes=POD -std=c++20 %s modernize-use-designated-initializers %t \
-// RUN: -- -config="{CheckOptions: {modernize-use-designated-initializers.RestrictToPODTypes: true}}" \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: -- -config="{CheckOptions: {modernize-use-designated-initializers.RestrictToPODTypes: true}}"
// RUN: %check_clang_tidy -check-suffixes=,MACROS -std=c++20 %s modernize-use-designated-initializers %t \
-// RUN: -- -config="{CheckOptions: {modernize-use-designated-initializers.IgnoreMacros: false}}" \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: -- -config="{CheckOptions: {modernize-use-designated-initializers.IgnoreMacros: false}}"
struct S1 {};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-copy.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-copy.cpp
index 3afa4a474f3ab..8cdbdc11d07fc 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-copy.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-copy.cpp
@@ -1,6 +1,6 @@
// RUN: %check_clang_tidy %s modernize-use-equals-default %t -- \
// RUN: -config="{CheckOptions: {modernize-use-equals-default.IgnoreMacros: false}}" \
-// RUN: -- -fno-delayed-template-parsing -fexceptions -Wno-error=return-type
+// RUN: -- -fexceptions -Wno-error=return-type
// Out of line definition.
struct OL {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx17.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx17.cpp
index 3bbc6296816b1..ea40291fc90f1 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx17.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx17.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17 %s modernize-use-equals-default %t -- -- -fno-delayed-template-parsing -fexceptions
+// RUN: %check_clang_tidy -std=c++17 %s modernize-use-equals-default %t -- -- -fexceptions
// Private constructor/destructor.
class Priv {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx20.cpp
index 38dfa5ebaea7e..9abeeb37d1553 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx20.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx20.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20 %s modernize-use-equals-default %t -- -- -fno-delayed-template-parsing -fexceptions
+// RUN: %check_clang_tidy -std=c++20 %s modernize-use-equals-default %t -- -- -fexceptions
// Private constructor/destructor.
class Priv {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default.cpp
index 2eefdf9d6460c..45b90f670f354 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-use-equals-default %t -- -- -fno-delayed-template-parsing -fexceptions
+// RUN: %check_clang_tidy %s modernize-use-equals-default %t -- -- -fexceptions
// Out of line definition.
class OL {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr-basic.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr-basic.cpp
index b9ffeecf2bafc..e8bd0a7cb28cb 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr-basic.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr-basic.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-use-nullptr %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s modernize-use-nullptr %t
const unsigned int g_null = 0;
#define NULL 0
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..348f3fd26bc79 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: -- -isystem %clang_tidy_headers
#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..f31734a7363c4 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: -- -isystem %clang_tidy_headers
#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..b4e38d794dadd 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 -- -- -isystem %clang_tidy_headers
#include <mutex>
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 cd88c84629ce4..3d897e9632fcd 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
+// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-use-trailing-return-type %t
namespace std {
template <typename T>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx20.cpp
index 83b9b84ef4014..1abdf95cd88c0 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx20.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-transform-lambdas-cxx20.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-trailing-return-type %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-trailing-return-type %t
namespace std {
template <typename T, typename U>
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 3d2d94ee56a76..83aa66faf471d 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,12 @@
// 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
+// RUN: modernize-use-trailing-return-type.TransformFunctions: false}}"
// 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
+// RUN: modernize-use-trailing-return-type.TransformFunctions: false}}"
// 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
+// RUN: modernize-use-trailing-return-type.TransformFunctions: true}}"
namespace std {
template <typename T>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp
index 8288f39126a11..f94ecc14db813 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-use-using %t -- -- -fno-delayed-template-parsing -I %S/Inputs/use-using/
+// RUN: %check_clang_tidy %s modernize-use-using %t -- -- -I %S/Inputs/use-using/
typedef int Type;
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy-allowed-types.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy-allowed-types.cpp
index 788cc7c78f7a2..a37858efcb8f5 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy-allowed-types.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy-allowed-types.cpp
@@ -1,6 +1,5 @@
// RUN: %check_clang_tidy %s performance-for-range-copy %t -- \
-// RUN: -config="{CheckOptions: {performance-for-range-copy.AllowedTypes: '[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$;qualified::Type;::fully::QualifiedType'}}" \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: -config="{CheckOptions: {performance-for-range-copy.AllowedTypes: '[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$;qualified::Type;::fully::QualifiedType'}}"
template <typename T>
struct Iterator {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy.cpp
index 0b5ef50fdbd7f..1fe6eec14082e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/for-range-copy.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s performance-for-range-copy %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s performance-for-range-copy %t
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-delayed.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-delayed.cpp
index 42d7699ad491b..6bb2925bb3501 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-delayed.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param-delayed.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- -- -fdelayed-template-parsing
+// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t
struct ExpensiveToCopyType {
const ExpensiveToCopyType & constReference() const {
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 8dc13d3ed7f85..2653f06aba6b5 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 -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t
// CHECK-FIXES: #include <utility>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/portability/std-allocator-const.cpp b/clang-tools-extra/test/clang-tidy/checkers/portability/std-allocator-const.cpp
index a38594aa94cbb..10b734a501fb8 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/portability/std-allocator-const.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/portability/std-allocator-const.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++11-or-later %s portability-std-allocator-const %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++11-or-later %s portability-std-allocator-const %t
namespace std {
typedef unsigned size_t;
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 a8e0eb6d262e6..ac7f56c41dbbb 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 -- -- -isystem %clang_tidy_headers
+// 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
#include <string>
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty-cxx20.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty-cxx20.cpp
index 42fb927d8c587..883c54df4311b 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty-cxx20.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty-cxx20.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++20 %s readability-container-size-empty %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++20 %s readability-container-size-empty %t
namespace std {
struct strong_ordering {
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 7844275c3a960..c145964d81d27 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: -- -isystem %clang_tidy_headers
#include <string>
namespace std {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/delete-null-pointer.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/delete-null-pointer.cpp
index 1a37c2bbf1133..54ca96d0998e1 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/delete-null-pointer.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/delete-null-pointer.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-delete-null-pointer %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s readability-delete-null-pointer %t
#define NULL 0
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-member-decl-usage.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-member-decl-usage.cpp
index 61c3aeb043934..69b276138ead3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-member-decl-usage.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-member-decl-usage.cpp
@@ -4,7 +4,7 @@
// RUN: readability-identifier-naming.ParameterCase: CamelCase, \
// RUN: readability-identifier-naming.MethodCase: camelBack, \
// RUN: readability-identifier-naming.AggressiveDependentMemberLookup: true \
-// RUN: }}' -- -fno-delayed-template-parsing
+// RUN: }}'
int set_up(int);
int clear(int);
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming.cpp
index 86502759c2bcd..0f6e9cacc2ac8 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming.cpp
@@ -82,7 +82,7 @@
// RUN: readability-identifier-naming.LocalPointerPrefix: 'l_', \
// RUN: readability-identifier-naming.LocalConstantPointerCase: CamelCase, \
// RUN: readability-identifier-naming.LocalConstantPointerPrefix: 'lc_', \
-// RUN: }}' -- -fno-delayed-template-parsing -Dbad_macro \
+// RUN: }}' -- -Dbad_macro \
// RUN: -I%S/Inputs/identifier-naming \
// RUN: -isystem %S/Inputs/identifier-naming/system
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp
index 982243255dd01..dfb5f8c2bb9e5 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-inconsistent-declaration-parameter-name %t -- --fix-notes -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s readability-inconsistent-declaration-parameter-name %t -- --fix-notes
void consistentFunction(int a, int b, int c);
void consistentFunction(int a, int b, int c);
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation-cpp17.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation-cpp17.cpp
index 31e3893a3e70b..bc77215785b61 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation-cpp17.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation-cpp17.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++17-or-later %s readability-misleading-indentation %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++17-or-later %s readability-misleading-indentation %t
namespace PR61435 {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation.cpp
index 5d4d60f5f1a35..8ef91d94662bc 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/misleading-indentation.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s readability-misleading-indentation %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s readability-misleading-indentation %t
void foo1();
void foo2();
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-casting.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-casting.cpp
index fa91995c5615f..ef1417784613d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-casting.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/redundant-casting.cpp
@@ -1,18 +1,16 @@
-// RUN: %check_clang_tidy -std=c++11,c++14,c++17 %s readability-redundant-casting %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++11,c++14,c++17 %s readability-redundant-casting %t
// RUN: %check_clang_tidy -std=c++11,c++14,c++17 -check-suffix=,MACROS %s readability-redundant-casting %t -- \
-// RUN: -config='{CheckOptions: { readability-redundant-casting.IgnoreMacros: false }}' \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: -config='{CheckOptions: { readability-redundant-casting.IgnoreMacros: false }}'
// RUN: %check_clang_tidy -std=c++11,c++14,c++17 -check-suffix=,ALIASES %s readability-redundant-casting %t -- \
-// RUN: -config='{CheckOptions: { readability-redundant-casting.IgnoreTypeAliases: true }}' \
-// RUN: -- -fno-delayed-template-parsing
+// RUN: -config='{CheckOptions: { readability-redundant-casting.IgnoreTypeAliases: true }}'
// RUN: %check_clang_tidy -std=c++20 %s readability-redundant-casting %t -- \
-// RUN: -- -fno-delayed-template-parsing -D CXX_20=1
+// RUN: -- -D CXX_20=1
// RUN: %check_clang_tidy -std=c++20 -check-suffix=,MACROS %s readability-redundant-casting %t -- \
// RUN: -config='{CheckOptions: { readability-redundant-casting.IgnoreMacros: false }}' \
-// RUN: -- -fno-delayed-template-parsing -D CXX_20=1
+// RUN: -- -D CXX_20=1
// RUN: %check_clang_tidy -std=c++20 -check-suffix=,ALIASES %s readability-redundant-casting %t -- \
// RUN: -config='{CheckOptions: { readability-redundant-casting.IgnoreTypeAliases: true }}' \
-// RUN: -- -fno-delayed-template-parsing -D CXX_20=1
+// RUN: -- -D CXX_20=1
struct A {};
struct B : A {};
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/use-std-min-max.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/use-std-min-max.cpp
index 35ade8a7c6d37..a4016d8bd938d 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/use-std-min-max.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/use-std-min-max.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy -std=c++11-or-later %s readability-use-std-min-max %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy -std=c++11-or-later %s readability-use-std-min-max %t
#define MY_MACRO_MIN(a, b) ((a) < (b) ? (a) : (b))
constexpr int myConstexprMin(int a, int b) {
>From d3ed992ca85527f50cf99f66a6a02860028b4c3c Mon Sep 17 00:00:00 2001
From: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: Sun, 19 Oct 2025 02:40:42 -0700
Subject: [PATCH 4/5] formatting
---
clang/lib/Sema/Sema.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 8e0ad9325e2af..6e55b3b5a1c0e 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1254,7 +1254,7 @@ void Sema::ActOnEndOfTranslationUnit() {
if (LangOpts.DelayedTemplateParsing) {
// Try to parse any templates that have been delayed and never
// instantiated so that their bodies are available for static
- // analysis tools to analyze.
+ // analysis tools to analyze.
Diags.setSuppressAllDiagnostics(true);
for (auto &[Decl, Template] : LateParsedTemplateMap)
if (Decl->isLateTemplateParsed())
>From 1c786a18d5bce44e7547a40d654f544c5ed339b2 Mon Sep 17 00:00:00 2001
From: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: Sun, 19 Oct 2025 03:39:30 -0700
Subject: [PATCH 5/5] Migrate clangd away from `-fno-delayed-template-parsing`
---
clang-tools-extra/clangd/unittests/ParsedASTTests.cpp | 2 +-
clang-tools-extra/clangd/unittests/RenameTests.cpp | 1 -
clang-tools-extra/clangd/unittests/XRefsTests.cpp | 3 ---
clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h | 1 -
4 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp b/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
index f9752d5d44f97..cb62bd17f7fd6 100644
--- a/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
+++ b/clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
@@ -203,7 +203,7 @@ TEST(ParsedASTTest,
AllOf(declNamed("foo"), withTemplateArgs("<bool>"))}));
}
-TEST(ParsedASTTest, IgnoresDelayedTemplateParsing) {
+TEST(ParsedASTTest, WorksEvenWithDelayedTemplateParsing) {
auto TU = TestTU::withCode(R"cpp(
template <typename T> void xxx() {
int yyy = 0;
diff --git a/clang-tools-extra/clangd/unittests/RenameTests.cpp b/clang-tools-extra/clangd/unittests/RenameTests.cpp
index 5d2a77b62a219..e784367c2a718 100644
--- a/clang-tools-extra/clangd/unittests/RenameTests.cpp
+++ b/clang-tools-extra/clangd/unittests/RenameTests.cpp
@@ -1382,7 +1382,6 @@ TEST(RenameTest, Renameable) {
SCOPED_TRACE(Case.Code);
Annotations T(Case.Code);
TestTU TU = TestTU::withCode(T.code());
- TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
if (Case.IsHeaderFile) {
// We open the .h file as the main file.
TU.Filename = "test.h";
diff --git a/clang-tools-extra/clangd/unittests/XRefsTests.cpp b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
index 7ed08d7cce3d3..ba50a8644f233 100644
--- a/clang-tools-extra/clangd/unittests/XRefsTests.cpp
+++ b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
@@ -1418,9 +1418,6 @@ TEST(LocateSymbol, Ambiguous) {
}
)cpp");
auto TU = TestTU::withCode(T.code());
- // FIXME: Go-to-definition in a template requires disabling delayed template
- // parsing.
- TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
auto AST = TU.build();
// Ordered assertions are deliberate: we expect a predictable order.
EXPECT_THAT(locateSymbolAt(AST, T.point("1")), ElementsAre(sym("str")));
diff --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
index 195d6a6c60918..da54c139e5205 100644
--- a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
+++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
@@ -104,7 +104,6 @@ runCheckOnCode(StringRef Code, std::vector<ClangTidyError> *Errors = nullptr,
std::vector<std::string> Args(1, "clang-tidy");
Args.push_back("-fsyntax-only");
- Args.push_back("-fno-delayed-template-parsing");
std::string extension(
std::string(llvm::sys::path::extension(Filename.str())));
if (extension == ".m" || extension == ".mm") {
More information about the cfe-commits
mailing list