[clang-tools-extra] [clang-doc] fix FileCheck for conversion function HTML test (PR #141976)

Erick Velez via cfe-commits cfe-commits at lists.llvm.org
Thu May 29 09:25:29 PDT 2025


https://github.com/evelez7 created https://github.com/llvm/llvm-project/pull/141976

The HTML FileCheck was missing the RUN command. Fixing that revealed an error in the HTML check.

>From 38fa68d1e35cdffe4199e0cafde62edba54956ef Mon Sep 17 00:00:00 2001
From: Erick Velez <erickvelez7 at gmail.com>
Date: Wed, 28 May 2025 10:04:06 -0700
Subject: [PATCH] [clang-doc] fix FileCheck not running for conversion HTML
 test

Forgot to add RUN for the test which revealed a problem with the test.
---
 clang-tools-extra/test/clang-doc/conversion_function.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang-tools-extra/test/clang-doc/conversion_function.cpp b/clang-tools-extra/test/clang-doc/conversion_function.cpp
index bf97d85661346..0200a578219ee 100644
--- a/clang-tools-extra/test/clang-doc/conversion_function.cpp
+++ b/clang-tools-extra/test/clang-doc/conversion_function.cpp
@@ -4,7 +4,7 @@
 // RUN: find %t/ -regex ".*/[0-9A-F]*.yaml" -exec cat {} ";" | FileCheck %s --check-prefix=CHECK-YAML
 
 // RUN: clang-doc --format=html --output=%t --executor=standalone %s 
-// FileCheck %s --check-prefix=CHECK-HTML
+// RUN: FileCheck %s < %t/GlobalNamespace/MyStruct.html --check-prefix=CHECK-HTML
 
 template <typename T>
 struct MyStruct {
@@ -14,5 +14,5 @@ struct MyStruct {
 // Output correct conversion names.
 // CHECK-YAML:         Name:            'operator T'
 
-// CHECK-HTML: <h3 id='{{[0-9A-F]*}}'>operator T</h3>
+// CHECK-HTML: <h3 id="{{[0-9A-F]*}}">operator T</h3>
 // CHECK-HTML: <p>public T operator T()</p>



More information about the cfe-commits mailing list