Issue 135587
Summary [Clang-doc] invalid implementation file reference
Labels new issue
Assignees
Reporter hulxv
    After generating the documentation, `clang-doc` generates some references that link to the definition and implementation of each function/method. But, it generates an implementation reference in this way
```html
<h3 id="180C359AB8E98A663762001FF59A0FA5F0D9240B">add</h3>
<p>public int add(int a, int b)</p>
<p>
  Defined at line 
  <a href=""
   of file 
  <a href=""
</p>
```
So, when hosting it using an HTTP server or directly from the browser and clicking on the link, the browser will redirect it as a child for the current path (`docs/GlobalNamespace/` in our case), and this path doesn't refer to the correct path of the definition/implementation file.


## Showcase

https://github.com/user-attachments/assets/c4cb5df5-654d-40b3-a0d5-3f5798f716b2


## Possible Solution
I think by converting this path into the absolute path from the root. The output will be similar to this:

```html
<h3 id="180C359AB8E98A663762001FF59A0FA5F0D9240B">add</h3>
<p>public int add(int a, int b)</p>
<p>
  Defined at line 
  <a href=""
 of file 
  <a href=""
</p>
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to