Skip to content

Commit 54bda2b

Browse files
committed
[FOLD]
1 parent 81e5847 commit 54bda2b

File tree

5 files changed

+104
-6
lines changed

5 files changed

+104
-6
lines changed

src/lib/AST/ASTVisitor.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3143,14 +3143,17 @@ findFileInfo(Decl const* D)
31433143

31443144
ASTVisitor::FileInfo
31453145
ASTVisitor::
3146-
buildFileInfo(std::string_view const file_path)
3146+
buildFileInfo(std::string_view path)
31473147
{
31483148
FileInfo file_info;
3149-
file_info.full_path = file_path;
3150-
if (!files::isPosixStyle(file_info.full_path))
3151-
{
3149+
file_info.full_path = path;
3150+
3151+
if (! files::isAbsolute(file_info.full_path))
3152+
file_info.full_path = files::makeAbsolute(
3153+
file_info.full_path, config_->sourceRoot);
3154+
3155+
if (! files::isPosixStyle(file_info.full_path))
31523156
file_info.full_path = files::makePosixStyle(file_info.full_path);
3153-
}
31543157

31553158
// Attempts to get a relative path for the prefix
31563159
auto tryGetRelativePosixPath = [&file_info](std::string_view const prefix)

src/lib/AST/ASTVisitor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ class ASTVisitor
11331133
@return the FileInfo object.
11341134
*/
11351135
FileInfo
1136-
buildFileInfo(std::string_view file_path);
1136+
buildFileInfo(std::string_view path);
11371137

11381138
/* Result of an upsert operation
11391139

test-files/golden-tests/filters/file/include-symlink.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,33 @@
55
== Global namespace
66

77

8+
=== Functions
9+
10+
[cols=2]
11+
|===
12+
| Name | Description
13+
14+
| <<f,`f`>>
15+
| A brief&period;
16+
17+
|===
18+
19+
[#f]
20+
== f
21+
22+
23+
A brief&period;
24+
25+
=== Synopsis
26+
27+
28+
Declared in `&lt;included&period;hpp&gt;`
29+
30+
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
31+
----
32+
void
33+
f();
34+
----
835

936

1037

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<html lang="en">
2+
<head>
3+
<title>Reference</title>
4+
</head>
5+
<body>
6+
<div>
7+
<h1>Reference</h1>
8+
<div>
9+
<div>
10+
<h2 id="index">Global namespace</h2>
11+
</div>
12+
<h2>Functions</h2>
13+
<table style="table-layout: fixed; width: 100%;">
14+
<thead>
15+
<tr>
16+
<th>Name</th><th>Description</th>
17+
</tr>
18+
</thead>
19+
<tbody>
20+
<tr>
21+
<td><a href="#f"><code>f</code></a> </td><td><span><span>A brief.</span></span>
22+
23+
</td></tr>
24+
</tbody>
25+
</table>
26+
</div>
27+
<div>
28+
<div>
29+
<h2 id="f">f</h2>
30+
<div>
31+
<span><span>A brief.</span></span>
32+
33+
34+
</div>
35+
</div>
36+
<div>
37+
<h3>Synopsis</h3>
38+
<div>
39+
Declared in <code>&lt;included.hpp&gt;</code></div>
40+
<pre>
41+
<code class="source-code cpp">
42+
void
43+
f();
44+
</code>
45+
</pre>
46+
</div>
47+
</div>
48+
49+
</div>
50+
<div>
51+
<h4>Created with <a href="https://www.mrdocs.com">MrDocs</a></h4>
52+
</div>
53+
</body>
54+
</html>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<mrdocs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://github.com/cppalliance/mrdocs/raw/develop/mrdocs.rnc">
4+
<namespace id="//////////////////////////8=">
5+
<function name="f" id="s6nsa+zVhpzzrN+yUVPP5rvdXqs=">
6+
<file short-path="included.hpp" source-path="included.hpp" line="4"/>
7+
<doc>
8+
<brief>
9+
<text>A brief.</text>
10+
</brief>
11+
</doc>
12+
</function>
13+
</namespace>
14+
</mrdocs>

0 commit comments

Comments
 (0)