[clang-tools-extra] [clang-doc][test] Pass -- to avoid compilation database lookup (PR #247006)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 29 10:44:30 PST 2026
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/247006
Without `--`, clang-doc searches the input file's parent directories for
compile_commands.json. With one in the source tree (commonly a symlink
for ccls/clangd), the tests compile Inputs/*.cpp with flags interpolated from
a neighboring entry.
Since #176420 enabled PCH by default, these flags include `-Xclang
-include-pch -Xclang .../LLVMSupport.dir/cmake_pch.hxx.pch`. That PCH is
built by the host compiler, and the just-built clang-doc rejects it:
```
error: PCH file '.../LLVMSupport.dir/cmake_pch.hxx.pch' uses an older format that is no longer supported
```
Pass `--` to use an empty fixed compilation database, which matches what
clang-doc gets without a compile_commands.json. The all-TUs tests keep
their explicit database.
LLM-aided
>From 03a58ebb793b35dd059e801e9872d2b62ee15025 Mon Sep 17 00:00:00 2001
From: Fangrui Song <i at maskray.me>
Date: Sun, 29 Nov 2026 10:17:50 -0800
Subject: [PATCH] [clang-doc][test] Pass -- to avoid compilation database
lookup
Without `--`, clang-doc searches the input file's parent directories for
compile_commands.json. With one in the source tree (commonly a symlink
for ccls/clangd), the tests compile Inputs/*.cpp with flags interpolated from
a neighboring entry.
Since #176420 enabled PCH by default, these flags include `-Xclang
-include-pch -Xclang .../LLVMSupport.dir/cmake_pch.hxx.pch`. That PCH is
built by the host compiler, and the just-built clang-doc rejects it:
```
error: PCH file '.../LLVMSupport.dir/cmake_pch.hxx.pch' uses an older format that is no longer supported
```
Pass `--` to use an empty fixed compilation database, which matches what
clang-doc gets without a compile_commands.json. The all-TUs tests keep
their explicit database.
LLM-aided
---
clang-tools-extra/test/clang-doc/DR-141990.cpp | 2 +-
clang-tools-extra/test/clang-doc/assets.cpp | 2 +-
clang-tools-extra/test/clang-doc/html/array-type.cpp | 2 +-
.../clang-doc/html/class-partial-specialization.cpp | 2 +-
.../test/clang-doc/html/class-specialization.cpp | 2 +-
clang-tools-extra/test/clang-doc/html/class.cpp | 2 +-
.../test/clang-doc/html/comments-in-macros.cpp | 2 +-
.../test/clang-doc/html/compound-constraints.cpp | 2 +-
.../test/clang-doc/html/conversion_function.cpp | 2 +-
clang-tools-extra/test/clang-doc/html/enum.cpp | 2 +-
.../test/clang-doc/html/function-pointer-type.cpp | 2 +-
clang-tools-extra/test/clang-doc/html/index.cpp | 2 +-
clang-tools-extra/test/clang-doc/html/long-name.cpp | 2 +-
.../clang-doc/html/member-function-pointer-type.cpp | 2 +-
.../test/clang-doc/html/mustache-index.cpp | 2 +-
.../clang-doc/html/mustache-separate-namespace.cpp | 2 +-
clang-tools-extra/test/clang-doc/html/namespace.cpp | 2 +-
.../clang-doc/html/nested-pointer-qualifiers.cpp | 2 +-
clang-tools-extra/test/clang-doc/html/templates.cpp | 2 +-
.../test/clang-doc/html/typedef-alias.cpp | 2 +-
clang-tools-extra/test/clang-doc/invalid-options.cpp | 12 ++++++------
clang-tools-extra/test/clang-doc/json/array-type.cpp | 2 +-
.../clang-doc/json/class-partial-specialization.cpp | 2 +-
.../test/clang-doc/json/class-requires.cpp | 2 +-
.../test/clang-doc/json/class-specialization.cpp | 2 +-
.../test/clang-doc/json/class-template.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/class.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/compact.cpp | 2 +-
.../test/clang-doc/json/compound-constraints.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/concept.cpp | 2 +-
.../test/clang-doc/json/conversion_function.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/enum.cpp | 2 +-
.../test/clang-doc/json/function-pointer-type.cpp | 2 +-
.../test/clang-doc/json/function-requires.cpp | 2 +-
.../test/clang-doc/json/function-specifiers.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/index.cpp | 2 +-
.../test/clang-doc/json/inheritance.cpp | 2 +-
.../test/clang-doc/json/invalid-utf8-comment.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/long-name.cpp | 2 +-
.../clang-doc/json/member-function-pointer-type.cpp | 2 +-
.../test/clang-doc/json/method-template.cpp | 2 +-
.../test/clang-doc/json/multiple-namespaces.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/namespace.cpp | 2 +-
.../test/clang-doc/json/nested-namespace.cpp | 2 +-
.../clang-doc/json/nested-pointer-qualifiers.cpp | 2 +-
clang-tools-extra/test/clang-doc/json/templates.cpp | 2 +-
clang-tools-extra/test/clang-doc/md/array-type.cpp | 2 +-
.../test/clang-doc/md/builtin_types.cpp | 2 +-
.../clang-doc/md/class-partial-specialization.cpp | 2 +-
.../test/clang-doc/md/comments-in-macros.cpp | 2 +-
clang-tools-extra/test/clang-doc/md/enum.cpp | 2 +-
.../test/clang-doc/md/function-pointer-type.cpp | 2 +-
.../clang-doc/md/member-function-pointer-type.cpp | 2 +-
clang-tools-extra/test/clang-doc/md/namespace.cpp | 2 +-
.../test/clang-doc/md/nested-pointer-qualifiers.cpp | 2 +-
clang-tools-extra/test/clang-doc/md/templates.cpp | 2 +-
56 files changed, 61 insertions(+), 61 deletions(-)
diff --git a/clang-tools-extra/test/clang-doc/DR-141990.cpp b/clang-tools-extra/test/clang-doc/DR-141990.cpp
index 019afb0654c200..5be3c7e9d8d17b 100644
--- a/clang-tools-extra/test/clang-doc/DR-141990.cpp
+++ b/clang-tools-extra/test/clang-doc/DR-141990.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc -output=%t %s 2>&1 | FileCheck %s --implicit-check-not="{{warning|error}}"
+// RUN: clang-doc -output=%t %s -- 2>&1 | FileCheck %s --implicit-check-not="{{warning|error}}"
// COM: This case triggered an assertion before #141990:
// COM: clang-doc: llvm-project/clang/lib/AST/Decl.cpp:2985:
diff --git a/clang-tools-extra/test/clang-doc/assets.cpp b/clang-tools-extra/test/clang-doc/assets.cpp
index 853dfe53d09f0f..ca6b872382e8a8 100644
--- a/clang-tools-extra/test/clang-doc/assets.cpp
+++ b/clang-tools-extra/test/clang-doc/assets.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir %t
-// RUN: clang-doc --format=html --output=%t --asset=%S/Inputs/test-assets --executor=standalone %s --base base_dir
+// RUN: clang-doc --format=html --output=%t --asset=%S/Inputs/test-assets --executor=standalone %s --base base_dir --
// RUN: FileCheck %s -input-file=%t/html/test.css -check-prefix=CSS
// RUN: FileCheck %s -input-file=%t/html/test.js -check-prefix=JS
diff --git a/clang-tools-extra/test/clang-doc/html/array-type.cpp b/clang-tools-extra/test/clang-doc/html/array-type.cpp
index 7b5df9c2991212..d1720de723285b 100644
--- a/clang-tools-extra/test/clang-doc/html/array-type.cpp
+++ b/clang-tools-extra/test/clang-doc/html/array-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/array-type.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/array-type.cpp --
// RUN: FileCheck %s --check-prefix=HTML < %t/html/GlobalNamespace/index.html
// HTML: <pre><code class="language-cpp code-clang-doc">void qux (int (&)[5] arr)</code></pre>
diff --git a/clang-tools-extra/test/clang-doc/html/class-partial-specialization.cpp b/clang-tools-extra/test/clang-doc/html/class-partial-specialization.cpp
index 3150025dd43d6d..e22fbe3332d2b4 100644
--- a/clang-tools-extra/test/clang-doc/html/class-partial-specialization.cpp
+++ b/clang-tools-extra/test/clang-doc/html/class-partial-specialization.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/class-partial-specialization.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/class-partial-specialization.cpp --
// RUN: FileCheck %s --check-prefix=HTML < %t/html/GlobalNamespace/_ZTV7MyClassIPT_E.html
// HTML: <pre><code class="language-cpp code-clang-doc">template <typename T></code></pre>
diff --git a/clang-tools-extra/test/clang-doc/html/class-specialization.cpp b/clang-tools-extra/test/clang-doc/html/class-specialization.cpp
index 024ee8ee24bd4b..db17f6bbe536dd 100644
--- a/clang-tools-extra/test/clang-doc/html/class-specialization.cpp
+++ b/clang-tools-extra/test/clang-doc/html/class-specialization.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/class-specialization.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/class-specialization.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html --check-prefix=HTML-NAMESPACE
// HTML-NAMESPACE: <section id="Records" class="section-container">
diff --git a/clang-tools-extra/test/clang-doc/html/class.cpp b/clang-tools-extra/test/clang-doc/html/class.cpp
index ddd1a7081a9655..5674ea3494dc91 100644
--- a/clang-tools-extra/test/clang-doc/html/class.cpp
+++ b/clang-tools-extra/test/clang-doc/html/class.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/class.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/class.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV7MyClass.html -check-prefix=HTML
// HTML: <a class="sidebar-item" href="#Records">Records</a>
diff --git a/clang-tools-extra/test/clang-doc/html/comments-in-macros.cpp b/clang-tools-extra/test/clang-doc/html/comments-in-macros.cpp
index 25c10876396f75..9181e4acfa3882 100644
--- a/clang-tools-extra/test/clang-doc/html/comments-in-macros.cpp
+++ b/clang-tools-extra/test/clang-doc/html/comments-in-macros.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %S/../Inputs/comments-in-macros.cpp
+// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %S/../Inputs/comments-in-macros.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV7MyClass.html --check-prefix=HTML-MYCLASS-LINE
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV7MyClass.html --check-prefix=HTML-MYCLASS
diff --git a/clang-tools-extra/test/clang-doc/html/compound-constraints.cpp b/clang-tools-extra/test/clang-doc/html/compound-constraints.cpp
index 48698945b90cb3..669f2ad9220b98 100644
--- a/clang-tools-extra/test/clang-doc/html/compound-constraints.cpp
+++ b/clang-tools-extra/test/clang-doc/html/compound-constraints.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --extra-arg -std=c++20 --output=%t --doxygen --format=html --executor=standalone %S/../Inputs/compound-constraints.cpp
+// RUN: clang-doc --extra-arg -std=c++20 --output=%t --doxygen --format=html --executor=standalone %S/../Inputs/compound-constraints.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html -check-prefix=CHECK-HTML
// CHECK-HTML: <a class="sidebar-item" href="#Concepts">Concepts</a>
diff --git a/clang-tools-extra/test/clang-doc/html/conversion_function.cpp b/clang-tools-extra/test/clang-doc/html/conversion_function.cpp
index 99cf95af9ad04c..d8ccdb52f0f7cb 100644
--- a/clang-tools-extra/test/clang-doc/html/conversion_function.cpp
+++ b/clang-tools-extra/test/clang-doc/html/conversion_function.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/conversion_function.cpp
+// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/conversion_function.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV8MyStruct.html --check-prefix=CHECK-HTML
// Output correct conversion names.
diff --git a/clang-tools-extra/test/clang-doc/html/enum.cpp b/clang-tools-extra/test/clang-doc/html/enum.cpp
index 9582a89f3561f6..30d06ae5d9a781 100644
--- a/clang-tools-extra/test/clang-doc/html/enum.cpp
+++ b/clang-tools-extra/test/clang-doc/html/enum.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %S/../Inputs/enum.cpp
+// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %S/../Inputs/enum.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html --check-prefix=HTML-INDEX
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV7Animals.html --check-prefix=HTML-ANIMAL
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV15FilePermissions.html --check-prefix=HTML-PERM
diff --git a/clang-tools-extra/test/clang-doc/html/function-pointer-type.cpp b/clang-tools-extra/test/clang-doc/html/function-pointer-type.cpp
index b98e766d4e39f1..b189033507f435 100644
--- a/clang-tools-extra/test/clang-doc/html/function-pointer-type.cpp
+++ b/clang-tools-extra/test/clang-doc/html/function-pointer-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/function-pointer-type.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/function-pointer-type.cpp --
// RUN: FileCheck %s --check-prefix=HTML < %t/html/GlobalNamespace/index.html
// HTML: <pre><code class="language-cpp code-clang-doc">void bar (void (*)(int) fn)</code></pre>
diff --git a/clang-tools-extra/test/clang-doc/html/index.cpp b/clang-tools-extra/test/clang-doc/html/index.cpp
index a76c625d4ef61a..8c9b0b03d8ba74 100644
--- a/clang-tools-extra/test/clang-doc/html/index.cpp
+++ b/clang-tools-extra/test/clang-doc/html/index.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --pretty-json --output=%t --executor=standalone %S/../Inputs/index.cpp
+// RUN: clang-doc --format=html --pretty-json --output=%t --executor=standalone %S/../Inputs/index.cpp --
// RUN: FileCheck %s < %t/html/index.html -check-prefix=CHECK-HTML
// CHECK-HTML: <main>
diff --git a/clang-tools-extra/test/clang-doc/html/long-name.cpp b/clang-tools-extra/test/clang-doc/html/long-name.cpp
index 556a66842e4226..eb68b2d7ff9503 100644
--- a/clang-tools-extra/test/clang-doc/html/long-name.cpp
+++ b/clang-tools-extra/test/clang-doc/html/long-name.cpp
@@ -1,6 +1,6 @@
// UNSUPPORTED: system-windows
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/long-name.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/long-name.cpp --
// RUN: ls %t/html/GlobalNamespace | FileCheck %s -check-prefix=CHECK-HTML
// CHECK-HTML: ThisStructHasANameThatResultsInAMangledNameThatIsExactly250CharactersLongThatIsSupposedToTestTheFilenameLengthLimitsWithinClangDocInOrdertoSeeifclangdocwillcrashornotdependingonthelengthofthestructIfTheLengthIsTooLongThenClangDocWillCrashAnd12.html
diff --git a/clang-tools-extra/test/clang-doc/html/member-function-pointer-type.cpp b/clang-tools-extra/test/clang-doc/html/member-function-pointer-type.cpp
index 145cbd06a712cc..1f7b5c2b4ebd10 100644
--- a/clang-tools-extra/test/clang-doc/html/member-function-pointer-type.cpp
+++ b/clang-tools-extra/test/clang-doc/html/member-function-pointer-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/member-function-pointer-type.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/member-function-pointer-type.cpp --
// RUN: FileCheck %s --check-prefix=HTML < %t/html/GlobalNamespace/index.html
// HTML: <pre><code class="language-cpp code-clang-doc">void baz (void (Class::*)(int) fn)</code></pre>
diff --git a/clang-tools-extra/test/clang-doc/html/mustache-index.cpp b/clang-tools-extra/test/clang-doc/html/mustache-index.cpp
index 932a667685dd02..724e084867f994 100644
--- a/clang-tools-extra/test/clang-doc/html/mustache-index.cpp
+++ b/clang-tools-extra/test/clang-doc/html/mustache-index.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %S/../Inputs/mustache-index.cpp
+// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %S/../Inputs/mustache-index.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html
// CHECK: <summary class="sidebar-section">
diff --git a/clang-tools-extra/test/clang-doc/html/mustache-separate-namespace.cpp b/clang-tools-extra/test/clang-doc/html/mustache-separate-namespace.cpp
index 6df993ef278e8f..335a832ff5a6bb 100644
--- a/clang-tools-extra/test/clang-doc/html/mustache-separate-namespace.cpp
+++ b/clang-tools-extra/test/clang-doc/html/mustache-separate-namespace.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/mustache-separate-namespace.cpp
+// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/mustache-separate-namespace.cpp --
// RUN: FileCheck %s < %t/html/MyNamespace/index.html
// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html --check-prefix=CHECK-GLOBAL
diff --git a/clang-tools-extra/test/clang-doc/html/namespace.cpp b/clang-tools-extra/test/clang-doc/html/namespace.cpp
index c3ca6c183c04e2..1913739740e8de 100644
--- a/clang-tools-extra/test/clang-doc/html/namespace.cpp
+++ b/clang-tools-extra/test/clang-doc/html/namespace.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/namespace-html-md.cpp
+// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/namespace-html-md.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html -check-prefix=HTML-GLOBAL-INDEX
// RUN: FileCheck %s < %t/html/@nonymous_namespace/_ZTVN12_GLOBAL__N_19AnonClassE.html -check-prefix=HTML-ANON-CLASS-LINE
// RUN: FileCheck %s < %t/html/@nonymous_namespace/_ZTVN12_GLOBAL__N_19AnonClassE.html -check-prefix=HTML-ANON-CLASS
diff --git a/clang-tools-extra/test/clang-doc/html/nested-pointer-qualifiers.cpp b/clang-tools-extra/test/clang-doc/html/nested-pointer-qualifiers.cpp
index a0888f6fcb8320..d4c5ff84f07f96 100644
--- a/clang-tools-extra/test/clang-doc/html/nested-pointer-qualifiers.cpp
+++ b/clang-tools-extra/test/clang-doc/html/nested-pointer-qualifiers.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/nested-pointer-qualifiers.cpp
+// RUN: clang-doc --output=%t --format=html --executor=standalone %S/../Inputs/nested-pointer-qualifiers.cpp --
// RUN: FileCheck %s --check-prefix=HTML < %t/html/GlobalNamespace/index.html
// HTML: <pre><code class="language-cpp code-clang-doc">void foo (const int *const * ptr)</code></pre>
diff --git a/clang-tools-extra/test/clang-doc/html/templates.cpp b/clang-tools-extra/test/clang-doc/html/templates.cpp
index c08d8434cbe244..8b3b91c147ad4c 100644
--- a/clang-tools-extra/test/clang-doc/html/templates.cpp
+++ b/clang-tools-extra/test/clang-doc/html/templates.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --doxygen --executor=standalone %S/../Inputs/templates.cpp -output=%t/docs --format=html
+// RUN: clang-doc --pretty-json --doxygen --executor=standalone %S/../Inputs/templates.cpp -output=%t/docs --format=html --
// RUN: cat %t/docs/html/GlobalNamespace/_ZTV5tuple.html | FileCheck %s --check-prefix=HTML-STRUCT
// RUN: cat %t/docs/html/GlobalNamespace/index.html | FileCheck %s --check-prefix=HTML
diff --git a/clang-tools-extra/test/clang-doc/html/typedef-alias.cpp b/clang-tools-extra/test/clang-doc/html/typedef-alias.cpp
index 1d930c38514621..f8ff592fddf785 100644
--- a/clang-tools-extra/test/clang-doc/html/typedef-alias.cpp
+++ b/clang-tools-extra/test/clang-doc/html/typedef-alias.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/typedef-alias.cpp
+// RUN: clang-doc --format=html --output=%t --executor=standalone %S/../Inputs/typedef-alias.cpp --
// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html -check-prefix=HTML-GLOBAL
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV6Vector.html -check-prefix=HTML-VECTOR
diff --git a/clang-tools-extra/test/clang-doc/invalid-options.cpp b/clang-tools-extra/test/clang-doc/invalid-options.cpp
index 15e098ad4c784b..a8796e78c333b4 100644
--- a/clang-tools-extra/test/clang-doc/invalid-options.cpp
+++ b/clang-tools-extra/test/clang-doc/invalid-options.cpp
@@ -1,28 +1,28 @@
/// Invalid output path (%t is a file, not a directory).
// RUN: rm -rf %t && touch %t
-// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s --check-prefix=OUTPUT-FAIL
+// RUN: not clang-doc %s -output=%t/subdir -- 2>&1 | FileCheck %s --check-prefix=OUTPUT-FAIL
// OUTPUT-FAIL: clang-doc error:
// OUTPUT-FAIL-SAME: failed to create directory.
/// Invalid format option.
// RUN: rm -rf %t && mkdir %t && touch %t/file
-// RUN: not clang-doc %s --output=%t/file -format=badformat 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT
+// RUN: not clang-doc %s --output=%t/file -format=badformat -- 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT
// BAD-FORMAT: clang-doc: for the --format option: Cannot find option named 'badformat'!
/// Missing HTML asset directory (warning only).
-// RUN: clang-doc %s -format=html -asset=%t/nonexistent-assets 2>&1 | FileCheck %s --check-prefix=ASSET-WARN
+// RUN: clang-doc %s -format=html -asset=%t/nonexistent-assets -- 2>&1 | FileCheck %s --check-prefix=ASSET-WARN
// ASSET-WARN: Asset path supply is not a directory
/// Mapping failure (with --ignore-map-errors=false).
-// RUN: not clang-doc %t/nonexistent.cpp -ignore-map-errors=false 2>&1 | FileCheck %s --check-prefix=MAP-FAIL
+// RUN: not clang-doc %t/nonexistent.cpp -ignore-map-errors=false -- 2>&1 | FileCheck %s --check-prefix=MAP-FAIL
// MAP-FAIL: clang-doc error: Failed to run action
/// Mapping failure (with --ignore-map-errors=true).
-// RUN: clang-doc %t/nonexistent.cpp 2>&1 | FileCheck %s --check-prefix=MAP-WARN
+// RUN: clang-doc %t/nonexistent.cpp -- 2>&1 | FileCheck %s --check-prefix=MAP-WARN
// MAP-WARN: Error mapping decls in files. Clang-doc will ignore these files and continue
///Invalid executor type
-// RUN: not clang-doc --executor=invalid %s 2>&1 | FileCheck %s --check-prefix=EXECUTOR-FAIL
+// RUN: not clang-doc --executor=invalid %s -- 2>&1 | FileCheck %s --check-prefix=EXECUTOR-FAIL
// EXECUTOR-FAIL: clang-doc error:
// EXECUTOR-FAIL: Executor "invalid" is not registered
diff --git a/clang-tools-extra/test/clang-doc/json/array-type.cpp b/clang-tools-extra/test/clang-doc/json/array-type.cpp
index 861210879a8874..a1d8140d0af13c 100644
--- a/clang-tools-extra/test/clang-doc/json/array-type.cpp
+++ b/clang-tools-extra/test/clang-doc/json/array-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/array-type.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/array-type.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: "Functions": [
diff --git a/clang-tools-extra/test/clang-doc/json/class-partial-specialization.cpp b/clang-tools-extra/test/clang-doc/json/class-partial-specialization.cpp
index fed192421926ba..3046eb59dc0815 100644
--- a/clang-tools-extra/test/clang-doc/json/class-partial-specialization.cpp
+++ b/clang-tools-extra/test/clang-doc/json/class-partial-specialization.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class-partial-specialization.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class-partial-specialization.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClassIPT_E.json
// CHECK: "MangledName": "_ZTV7MyClassIPT_E",
diff --git a/clang-tools-extra/test/clang-doc/json/class-requires.cpp b/clang-tools-extra/test/clang-doc/json/class-requires.cpp
index 09d93fb7ae17fd..f0f4a9ccb3cda9 100644
--- a/clang-tools-extra/test/clang-doc/json/class-requires.cpp
+++ b/clang-tools-extra/test/clang-doc/json/class-requires.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %S/../Inputs/class-requires.cpp
+// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %S/../Inputs/class-requires.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClass.json
// CHECK: "Name": "MyClass",
diff --git a/clang-tools-extra/test/clang-doc/json/class-specialization.cpp b/clang-tools-extra/test/clang-doc/json/class-specialization.cpp
index aa3390d81c6411..3eb01fa59229b4 100644
--- a/clang-tools-extra/test/clang-doc/json/class-specialization.cpp
+++ b/clang-tools-extra/test/clang-doc/json/class-specialization.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class-specialization.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class-specialization.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClass.json --check-prefix=BASE
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClassIiE.json --check-prefix=SPECIALIZATION
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json --check-prefix=JSON-NAMESPACE
diff --git a/clang-tools-extra/test/clang-doc/json/class-template.cpp b/clang-tools-extra/test/clang-doc/json/class-template.cpp
index b465b3bb6ab391..cb0fd05fd2bbd7 100644
--- a/clang-tools-extra/test/clang-doc/json/class-template.cpp
+++ b/clang-tools-extra/test/clang-doc/json/class-template.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class-template.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class-template.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClass.json
// CHECK: "Name": "MyClass",
diff --git a/clang-tools-extra/test/clang-doc/json/class.cpp b/clang-tools-extra/test/clang-doc/json/class.cpp
index d901ca8dcbfd56..37ea7865525b0f 100644
--- a/clang-tools-extra/test/clang-doc/json/class.cpp
+++ b/clang-tools-extra/test/clang-doc/json/class.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/class.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClass.json
// CHECK: {
diff --git a/clang-tools-extra/test/clang-doc/json/compact.cpp b/clang-tools-extra/test/clang-doc/json/compact.cpp
index b3916057ee05f1..3ffa17359c03be 100644
--- a/clang-tools-extra/test/clang-doc/json/compact.cpp
+++ b/clang-tools-extra/test/clang-doc/json/compact.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --doxygen --output=%t --format=json --executor=standalone %S/../Inputs/compact.cpp
+// RUN: clang-doc --doxygen --output=%t --format=json --executor=standalone %S/../Inputs/compact.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV3Foo.json --check-prefix=CLASS
// RUN: FileCheck %s < %t/json/index.json --check-prefix=INDEX
diff --git a/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp b/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
index c01e2392bff8a1..fac1660f8f7d5e 100644
--- a/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
+++ b/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --doxygen --format=json --executor=standalone %S/../Inputs/compound-constraints.cpp
+// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --doxygen --format=json --executor=standalone %S/../Inputs/compound-constraints.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: "Name": "One",
diff --git a/clang-tools-extra/test/clang-doc/json/concept.cpp b/clang-tools-extra/test/clang-doc/json/concept.cpp
index 0218239fdc0087..3cdba77116d943 100644
--- a/clang-tools-extra/test/clang-doc/json/concept.cpp
+++ b/clang-tools-extra/test/clang-doc/json/concept.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %S/../Inputs/concept.cpp
+// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %S/../Inputs/concept.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: {
diff --git a/clang-tools-extra/test/clang-doc/json/conversion_function.cpp b/clang-tools-extra/test/clang-doc/json/conversion_function.cpp
index 71d3b9f2a6e3f6..15d2585f233763 100644
--- a/clang-tools-extra/test/clang-doc/json/conversion_function.cpp
+++ b/clang-tools-extra/test/clang-doc/json/conversion_function.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=json --pretty-json --output=%t --executor=standalone %S/../Inputs/conversion_function.cpp
+// RUN: clang-doc --format=json --pretty-json --output=%t --executor=standalone %S/../Inputs/conversion_function.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV8MyStruct.json --check-prefix=CHECK-JSON
// CHECK-JSON: "Name": "operator T",
diff --git a/clang-tools-extra/test/clang-doc/json/enum.cpp b/clang-tools-extra/test/clang-doc/json/enum.cpp
index 6e25823764718a..aaaa0f1bca519f 100644
--- a/clang-tools-extra/test/clang-doc/json/enum.cpp
+++ b/clang-tools-extra/test/clang-doc/json/enum.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --doxygen --output=%t --format=json --executor=standalone %S/../Inputs/enum.cpp
+// RUN: clang-doc --pretty-json --doxygen --output=%t --format=json --executor=standalone %S/../Inputs/enum.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json --check-prefix=JSON-INDEX
// RUN: FileCheck %s < %t/json/Vehicles/index.json --check-prefix=JSON-VEHICLES-INDEX
diff --git a/clang-tools-extra/test/clang-doc/json/function-pointer-type.cpp b/clang-tools-extra/test/clang-doc/json/function-pointer-type.cpp
index 34b693bc67d2b0..e98c06dd306da8 100644
--- a/clang-tools-extra/test/clang-doc/json/function-pointer-type.cpp
+++ b/clang-tools-extra/test/clang-doc/json/function-pointer-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/function-pointer-type.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/function-pointer-type.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: "Functions": [
diff --git a/clang-tools-extra/test/clang-doc/json/function-requires.cpp b/clang-tools-extra/test/clang-doc/json/function-requires.cpp
index 42471c8afabdd1..1e790fcfb01fb3 100644
--- a/clang-tools-extra/test/clang-doc/json/function-requires.cpp
+++ b/clang-tools-extra/test/clang-doc/json/function-requires.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %S/../Inputs/function-requires.cpp
+// RUN: clang-doc --pretty-json --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %S/../Inputs/function-requires.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: "Functions": [
diff --git a/clang-tools-extra/test/clang-doc/json/function-specifiers.cpp b/clang-tools-extra/test/clang-doc/json/function-specifiers.cpp
index f0804dc6da192b..2234e69c0d407f 100644
--- a/clang-tools-extra/test/clang-doc/json/function-specifiers.cpp
+++ b/clang-tools-extra/test/clang-doc/json/function-specifiers.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/function-specifiers.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/function-specifiers.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: "Functions": [
diff --git a/clang-tools-extra/test/clang-doc/json/index.cpp b/clang-tools-extra/test/clang-doc/json/index.cpp
index 8c47de76ebb920..0c49b7662d68bb 100644
--- a/clang-tools-extra/test/clang-doc/json/index.cpp
+++ b/clang-tools-extra/test/clang-doc/json/index.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=json --pretty-json --output=%t --executor=standalone %S/../Inputs/index.cpp
+// RUN: clang-doc --format=json --pretty-json --output=%t --executor=standalone %S/../Inputs/index.cpp --
// RUN: FileCheck %s < %t/json/index.json -check-prefix=CHECK-JSON
// CHECK-JSON: "Index": [
diff --git a/clang-tools-extra/test/clang-doc/json/inheritance.cpp b/clang-tools-extra/test/clang-doc/json/inheritance.cpp
index 788086efa20260..18d86ea317de1e 100644
--- a/clang-tools-extra/test/clang-doc/json/inheritance.cpp
+++ b/clang-tools-extra/test/clang-doc/json/inheritance.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/inheritance.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/inheritance.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClass.json
// CHECK: "Bases": [
diff --git a/clang-tools-extra/test/clang-doc/json/invalid-utf8-comment.cpp b/clang-tools-extra/test/clang-doc/json/invalid-utf8-comment.cpp
index b2bd4174832d97..1597019b1353c9 100644
--- a/clang-tools-extra/test/clang-doc/json/invalid-utf8-comment.cpp
+++ b/clang-tools-extra/test/clang-doc/json/invalid-utf8-comment.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/invalid-utf8-comment.cpp 2>&1
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/invalid-utf8-comment.cpp -- 2>&1
// RUN: cat %t/json/GlobalNamespace/_ZTV1A.json | FileCheck %s
// Regression test for https://github.com/llvm/llvm-project/issues/210675.
diff --git a/clang-tools-extra/test/clang-doc/json/long-name.cpp b/clang-tools-extra/test/clang-doc/json/long-name.cpp
index 865d3b92ec5fcd..9b78ef3c8f4e07 100644
--- a/clang-tools-extra/test/clang-doc/json/long-name.cpp
+++ b/clang-tools-extra/test/clang-doc/json/long-name.cpp
@@ -1,6 +1,6 @@
// UNSUPPORTED: system-windows
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=json --executor=standalone %S/../Inputs/long-name.cpp
+// RUN: clang-doc --output=%t --format=json --executor=standalone %S/../Inputs/long-name.cpp --
// RUN: ls %t/json/GlobalNamespace | FileCheck %s -check-prefix=CHECK-JSON
// CHECK-JSON: ThisStructHasANameThatResultsInAMangledNameThatIsExactly250CharactersLongThatIsSupposedToTestTheFilenameLengthLimitsWithinClangDocInOrdertoSeeifclangdocwillcrashornotdependingonthelengthofthestructIfTheLengthIsTooLongThenClangDocWillCrashAnd12.json
diff --git a/clang-tools-extra/test/clang-doc/json/member-function-pointer-type.cpp b/clang-tools-extra/test/clang-doc/json/member-function-pointer-type.cpp
index 8ca1ecbb1d14d4..87cddb5b497304 100644
--- a/clang-tools-extra/test/clang-doc/json/member-function-pointer-type.cpp
+++ b/clang-tools-extra/test/clang-doc/json/member-function-pointer-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/member-function-pointer-type.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/member-function-pointer-type.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: "Functions": [
diff --git a/clang-tools-extra/test/clang-doc/json/method-template.cpp b/clang-tools-extra/test/clang-doc/json/method-template.cpp
index dc2c255a7d7c35..07fbe8aa2af934 100644
--- a/clang-tools-extra/test/clang-doc/json/method-template.cpp
+++ b/clang-tools-extra/test/clang-doc/json/method-template.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/method-template.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/method-template.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/_ZTV7MyClass.json
// CHECK: "PublicMethods": [
diff --git a/clang-tools-extra/test/clang-doc/json/multiple-namespaces.cpp b/clang-tools-extra/test/clang-doc/json/multiple-namespaces.cpp
index 99220fce212dd1..92e57e3223406a 100644
--- a/clang-tools-extra/test/clang-doc/json/multiple-namespaces.cpp
+++ b/clang-tools-extra/test/clang-doc/json/multiple-namespaces.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/multiple-namespaces.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/multiple-namespaces.cpp --
// RUN: FileCheck %s < %t/json/foo/tools/index.json --check-prefix=CHECK-FOO
// RUN: FileCheck %s < %t/json/bar/tools/index.json --check-prefix=CHECK-BAR
diff --git a/clang-tools-extra/test/clang-doc/json/namespace.cpp b/clang-tools-extra/test/clang-doc/json/namespace.cpp
index f9bb831b0c5af8..876a2b4dae6cc4 100644
--- a/clang-tools-extra/test/clang-doc/json/namespace.cpp
+++ b/clang-tools-extra/test/clang-doc/json/namespace.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/namespace.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/namespace.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: {
diff --git a/clang-tools-extra/test/clang-doc/json/nested-namespace.cpp b/clang-tools-extra/test/clang-doc/json/nested-namespace.cpp
index 640a70cadb1cac..e6cd32085c50ae 100644
--- a/clang-tools-extra/test/clang-doc/json/nested-namespace.cpp
+++ b/clang-tools-extra/test/clang-doc/json/nested-namespace.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/nested-namespace.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/nested-namespace.cpp --
// RUN: FileCheck %s < %t/json/nested/index.json --check-prefix=NESTED
// RUN: FileCheck %s < %t/json/nested/inner/index.json --check-prefix=INNER
diff --git a/clang-tools-extra/test/clang-doc/json/nested-pointer-qualifiers.cpp b/clang-tools-extra/test/clang-doc/json/nested-pointer-qualifiers.cpp
index 5a3e8842b80369..1ed5ad7df2f651 100644
--- a/clang-tools-extra/test/clang-doc/json/nested-pointer-qualifiers.cpp
+++ b/clang-tools-extra/test/clang-doc/json/nested-pointer-qualifiers.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/nested-pointer-qualifiers.cpp
+// RUN: clang-doc --pretty-json --output=%t --format=json --executor=standalone %S/../Inputs/nested-pointer-qualifiers.cpp --
// RUN: FileCheck %s < %t/json/GlobalNamespace/index.json
// CHECK: "Functions": [
diff --git a/clang-tools-extra/test/clang-doc/json/templates.cpp b/clang-tools-extra/test/clang-doc/json/templates.cpp
index cad585cf307478..7638e2ea6dc72e 100644
--- a/clang-tools-extra/test/clang-doc/json/templates.cpp
+++ b/clang-tools-extra/test/clang-doc/json/templates.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --pretty-json --doxygen --executor=standalone %S/../Inputs/templates.cpp -output=%t/docs --format=html
+// RUN: clang-doc --pretty-json --doxygen --executor=standalone %S/../Inputs/templates.cpp -output=%t/docs --format=html --
// RUN: FileCheck %s < %t/docs/json/GlobalNamespace/index.json --check-prefix=JSON
// JSON: "Name": "ParamPackFunction",
diff --git a/clang-tools-extra/test/clang-doc/md/array-type.cpp b/clang-tools-extra/test/clang-doc/md/array-type.cpp
index a70d464c38ec2b..22a6236028423d 100644
--- a/clang-tools-extra/test/clang-doc/md/array-type.cpp
+++ b/clang-tools-extra/test/clang-doc/md/array-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/array-type.cpp
+// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/array-type.cpp --
// RUN: FileCheck %s --check-prefix=MD < %t/md/GlobalNamespace/index.md
// MD: *void qux(int (&)[5] arr)*
diff --git a/clang-tools-extra/test/clang-doc/md/builtin_types.cpp b/clang-tools-extra/test/clang-doc/md/builtin_types.cpp
index 973a49f1353f89..d6bd92a944367f 100644
--- a/clang-tools-extra/test/clang-doc/md/builtin_types.cpp
+++ b/clang-tools-extra/test/clang-doc/md/builtin_types.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --doxygen --executor=standalone %S/../Inputs/builtin_types.cpp --output=%t --format=md
+// RUN: clang-doc --doxygen --executor=standalone %S/../Inputs/builtin_types.cpp --output=%t --format=md --
// RUN: FileCheck %s < %t/md/GlobalNamespace/index.md --check-prefix=MD
// MD: # Global Namespace
diff --git a/clang-tools-extra/test/clang-doc/md/class-partial-specialization.cpp b/clang-tools-extra/test/clang-doc/md/class-partial-specialization.cpp
index bdddca8045802a..318a7ac1de99ae 100644
--- a/clang-tools-extra/test/clang-doc/md/class-partial-specialization.cpp
+++ b/clang-tools-extra/test/clang-doc/md/class-partial-specialization.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/class-partial-specialization.cpp
+// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/class-partial-specialization.cpp --
// RUN: FileCheck %s --check-prefix=MD < %t/md/GlobalNamespace/_ZTV7MyClassIPT_E.md
// MD: # struct MyClass
diff --git a/clang-tools-extra/test/clang-doc/md/comments-in-macros.cpp b/clang-tools-extra/test/clang-doc/md/comments-in-macros.cpp
index 33cb71627da42f..b920c799588d20 100644
--- a/clang-tools-extra/test/clang-doc/md/comments-in-macros.cpp
+++ b/clang-tools-extra/test/clang-doc/md/comments-in-macros.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=md -doxygen --output=%t --executor=standalone %S/../Inputs/comments-in-macros.cpp
+// RUN: clang-doc --format=md -doxygen --output=%t --executor=standalone %S/../Inputs/comments-in-macros.cpp --
// RUN: FileCheck %s < %t/md/GlobalNamespace/_ZTV7MyClass.md --check-prefix=MD-MYCLASS-LINE
// RUN: FileCheck %s < %t/md/GlobalNamespace/_ZTV7MyClass.md --check-prefix=MD-MYCLASS
diff --git a/clang-tools-extra/test/clang-doc/md/enum.cpp b/clang-tools-extra/test/clang-doc/md/enum.cpp
index 1550e66ff1c96c..a5c60fb003de56 100644
--- a/clang-tools-extra/test/clang-doc/md/enum.cpp
+++ b/clang-tools-extra/test/clang-doc/md/enum.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=md --pretty-json --doxygen --output=%t --executor=standalone %S/../Inputs/enum.cpp
+// RUN: clang-doc --format=md --pretty-json --doxygen --output=%t --executor=standalone %S/../Inputs/enum.cpp --
// RUN: FileCheck %s < %t/md/GlobalNamespace/index.md --check-prefix=MD-INDEX
// RUN: FileCheck %s < %t/md/GlobalNamespace/_ZTV7Animals.md --check-prefix=MD-ANIMAL
// RUN: FileCheck %s < %t/md/Vehicles/index.md --check-prefix=MD-VEHICLES
diff --git a/clang-tools-extra/test/clang-doc/md/function-pointer-type.cpp b/clang-tools-extra/test/clang-doc/md/function-pointer-type.cpp
index de1f60c3d9b856..491da0a04106cf 100644
--- a/clang-tools-extra/test/clang-doc/md/function-pointer-type.cpp
+++ b/clang-tools-extra/test/clang-doc/md/function-pointer-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/function-pointer-type.cpp
+// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/function-pointer-type.cpp --
// RUN: FileCheck %s --check-prefix=MD < %t/md/GlobalNamespace/index.md
// MD: *void bar(void (*)(int) fn)*
diff --git a/clang-tools-extra/test/clang-doc/md/member-function-pointer-type.cpp b/clang-tools-extra/test/clang-doc/md/member-function-pointer-type.cpp
index 588b9beeecc99e..0771cb4e6065d1 100644
--- a/clang-tools-extra/test/clang-doc/md/member-function-pointer-type.cpp
+++ b/clang-tools-extra/test/clang-doc/md/member-function-pointer-type.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/member-function-pointer-type.cpp
+// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/member-function-pointer-type.cpp --
// RUN: FileCheck %s --check-prefix=MD < %t/md/GlobalNamespace/index.md
// MD: *void baz(void (Class::*)(int) fn)*
diff --git a/clang-tools-extra/test/clang-doc/md/namespace.cpp b/clang-tools-extra/test/clang-doc/md/namespace.cpp
index a9dd6880290f63..9b1f0130de3ffa 100644
--- a/clang-tools-extra/test/clang-doc/md/namespace.cpp
+++ b/clang-tools-extra/test/clang-doc/md/namespace.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --format=md --output=%t --executor=standalone %S/../Inputs/namespace-html-md.cpp
+// RUN: clang-doc --format=md --output=%t --executor=standalone %S/../Inputs/namespace-html-md.cpp --
// RUN: FileCheck %s < %t/md/@nonymous_namespace/_ZTVN12_GLOBAL__N_19AnonClassE.md -check-prefix=MD-ANON-CLASS-LINE
// RUN: FileCheck %s < %t/md/@nonymous_namespace/_ZTVN12_GLOBAL__N_19AnonClassE.md -check-prefix=MD-ANON-CLASS
// RUN: FileCheck %s < %t/md/@nonymous_namespace/index.md -check-prefix=MD-ANON-INDEX-LINE
diff --git a/clang-tools-extra/test/clang-doc/md/nested-pointer-qualifiers.cpp b/clang-tools-extra/test/clang-doc/md/nested-pointer-qualifiers.cpp
index 2552177cefbc41..ef417c4e9b75a7 100644
--- a/clang-tools-extra/test/clang-doc/md/nested-pointer-qualifiers.cpp
+++ b/clang-tools-extra/test/clang-doc/md/nested-pointer-qualifiers.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/nested-pointer-qualifiers.cpp
+// RUN: clang-doc --output=%t --format=md --executor=standalone %S/../Inputs/nested-pointer-qualifiers.cpp --
// RUN: FileCheck %s --check-prefix=MD-MUSTACHE < %t/md/GlobalNamespace/index.md
// MD-MUSTACHE: *void foo(const int *const * ptr)*
diff --git a/clang-tools-extra/test/clang-doc/md/templates.cpp b/clang-tools-extra/test/clang-doc/md/templates.cpp
index 68884ba34338ba..ab3334a54cd004 100644
--- a/clang-tools-extra/test/clang-doc/md/templates.cpp
+++ b/clang-tools-extra/test/clang-doc/md/templates.cpp
@@ -1,5 +1,5 @@
// RUN: rm -rf %t && mkdir -p %t
-// RUN: clang-doc --doxygen --executor=standalone %S/../Inputs/templates.cpp -output=%t/docs --format=md
+// RUN: clang-doc --doxygen --executor=standalone %S/../Inputs/templates.cpp -output=%t/docs --format=md --
// RUN: FileCheck %s --check-prefix=MD < %t/docs/md/GlobalNamespace/index.md
// MD: # Global Namespace
More information about the cfe-commits
mailing list