[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 30 00:11:14 PDT 2024


================
@@ -7,6 +7,7 @@
 // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefix=HTML-RECTANGLE
 // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefix=HTML-CIRCLE
 
+// JSON-INDEX: var RootPath = "{{.*}}";
----------------
PeterChou1 wrote:

This isn't a url, this variable is a path to the directory where clang-doc is built from. I wanted the html to still render properly when viewed via the local filesystem so I added this export variable.
Most the changes that is reflected in this patch can only be seen once the browser loads the page and javascript generates the sidebar with the indexes, I don't think its possible to see the changes reflected unless we incorporate some sort javascript test framework. We could also just generate the indexes via the c++ html generator than we be able to see the changes.
I've added some test that test the different behaviour when we generate clang-doc via a relative path or an absolute one, though


https://github.com/llvm/llvm-project/pull/93281


More information about the cfe-commits mailing list