Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@
{{/each}}
|===

{{/if}}
{{! Protected Base classes }}
{{#if (any_of_by symbol.bases "isProtected")}}
{{#> markup/dynamic-level-h }}Protected Base Classes{{/markup/dynamic-level-h}}
[cols=2]
|===
| Name
| Description
{{#each (filter_by symbol.bases "isProtected")}}
| {{#>markup/code}}{{> type/declarator type }}{{/markup/code}}
| {{> javadoc/inline-brief symbol.doc.brief }}
{{/each}}
|===

{{/if}}
{{! Members }}
{{! Record interface }}
Expand Down
19 changes: 19 additions & 0 deletions share/mrdocs/addons/generator/html/partials/symbol.html.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,25 @@
</table>
</div>
{{/if}}
{{! Protected Base classes }}
{{#if (any_of_by symbol.bases "isProtected")}}
<div>
{{#> markup/dynamic-level-h }}Protected Base Classes{{/markup/dynamic-level-h}}
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{{#each (filter_by symbol.bases "isProtected")}}
<tr><td>{{#>markup/code}}{{> type/declarator type }}{{/markup/code}}</td><td>{{> javadoc/inline-brief symbol.doc.brief }}</td></tr>
{{/each}}
</tbody>
</table>
</div>
{{/if}}
{{! Members }}
{{! Record interface }}
{{#if (eq symbol.kind "record")}}
Expand Down
5 changes: 4 additions & 1 deletion src/lib/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ traverse(DeclTy const* D)

auto exp = upsert<R>(D);
MRDOCS_CHECK_OR(exp, nullptr);
auto& [I, isNew] = *exp;
auto& I = exp->I;
auto& isNew = exp->isNew;

// Populate the base classes with the necessary information.
// Even when the object is new, we want to update the source locations
Expand Down Expand Up @@ -2803,6 +2804,8 @@ bool
ASTVisitor::
checkFileFilters(Decl const* D)
{
MRDOCS_SYMBOL_TRACE(D, context_);

FileInfo* fileInfo = findFileInfo(D);
MRDOCS_CHECK_OR(fileInfo, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,18 @@ class protected&lowbar;derived
, protected excluded&lowbar;base
----

=== Protected Base Classes

[cols=2]
|===
| Name
| Description
| `link:#base[base]`
| A base class to test inheritance and shadowing
| `excluded&lowbar;base`
|
|===

=== Member Functions

[cols=2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,21 @@ <h3>Synopsis</h3>
</code>
</pre>
</div>
<div>
<h2>Protected Base Classes</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code><a href="#base">base</a></code></td><td><span>A base class to test inheritance and shadowing</span></td></tr>
<tr><td><code>excluded_base</code></td><td><span></span></td></tr>
</tbody>
</table>
</div>
<h2>Member Functions</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
Expand Down
12 changes: 12 additions & 0 deletions test-files/golden-tests/config/inherit-base-members/copy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,18 @@ class protected&lowbar;derived
, protected excluded&lowbar;base
----

=== Protected Base Classes

[cols=2]
|===
| Name
| Description
| `link:#base[base]`
| A base class to test inheritance and shadowing
| `excluded&lowbar;base`
|
|===

=== Member Functions

[cols=2]
Expand Down
15 changes: 15 additions & 0 deletions test-files/golden-tests/config/inherit-base-members/copy.html
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,21 @@ <h3>Synopsis</h3>
</code>
</pre>
</div>
<div>
<h2>Protected Base Classes</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code><a href="#base">base</a></code></td><td><span>A base class to test inheritance and shadowing</span></td></tr>
<tr><td><code>excluded_base</code></td><td><span></span></td></tr>
</tbody>
</table>
</div>
<h2>Member Functions</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
Expand Down
12 changes: 12 additions & 0 deletions test-files/golden-tests/config/inherit-base-members/never.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,18 @@ class protected&lowbar;derived
, protected excluded&lowbar;base
----

=== Protected Base Classes

[cols=2]
|===
| Name
| Description
| `link:#base[base]`
| A base class to test inheritance and shadowing
| `excluded&lowbar;base`
|
|===

=== Member Functions

[cols=2]
Expand Down
15 changes: 15 additions & 0 deletions test-files/golden-tests/config/inherit-base-members/never.html
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,21 @@ <h3>Synopsis</h3>
</code>
</pre>
</div>
<div>
<h2>Protected Base Classes</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code><a href="#base">base</a></code></td><td><span>A base class to test inheritance and shadowing</span></td></tr>
<tr><td><code>excluded_base</code></td><td><span></span></td></tr>
</tbody>
</table>
</div>
<h2>Member Functions</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
Expand Down
12 changes: 12 additions & 0 deletions test-files/golden-tests/config/inherit-base-members/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,18 @@ class protected&lowbar;derived
, protected excluded&lowbar;base
----

=== Protected Base Classes

[cols=2]
|===
| Name
| Description
| `link:#base[base]`
| A base class to test inheritance and shadowing
| `excluded&lowbar;base`
|
|===

=== Member Functions

[cols=2]
Expand Down
15 changes: 15 additions & 0 deletions test-files/golden-tests/config/inherit-base-members/reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,21 @@ <h3>Synopsis</h3>
</code>
</pre>
</div>
<div>
<h2>Protected Base Classes</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code><a href="#base">base</a></code></td><td><span>A base class to test inheritance and shadowing</span></td></tr>
<tr><td><code>excluded_base</code></td><td><span></span></td></tr>
</tbody>
</table>
</div>
<h2>Member Functions</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,18 @@ class protected&lowbar;derived
, protected excluded&lowbar;base
----

=== Protected Base Classes

[cols=2]
|===
| Name
| Description
| `link:#base[base]`
|
| `excluded&lowbar;base`
|
|===

=== Member Functions

[cols=2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,21 @@ <h3>Synopsis</h3>
</code>
</pre>
</div>
<div>
<h2>Protected Base Classes</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code><a href="#base">base</a></code></td><td><span></span></td></tr>
<tr><td><code>excluded_base</code></td><td><span></span></td></tr>
</tbody>
</table>
</div>
<h2>Member Functions</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
Expand Down
20 changes: 20 additions & 0 deletions test-files/golden-tests/symbols/record/record-inheritance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ class C3
: protected link:#C0[C0]
----

=== Protected Base Classes

[cols=2]
|===
| Name
| Description
| `link:#C0[C0]`
|
|===

[#C4]
== C4

Expand Down Expand Up @@ -333,6 +343,16 @@ struct S5
, protected link:#S1[S1]
----

=== Protected Base Classes

[cols=2]
|===
| Name
| Description
| `link:#S1[S1]`
|
|===

[#S6]
== S6

Expand Down
28 changes: 28 additions & 0 deletions test-files/golden-tests/symbols/record/record-inheritance.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,20 @@ <h3>Synopsis</h3>
</code>
</pre>
</div>
<div>
<h2>Protected Base Classes</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code><a href="#C0">C0</a></code></td><td><span></span></td></tr>
</tbody>
</table>
</div>


</div>
Expand Down Expand Up @@ -464,6 +478,20 @@ <h3>Synopsis</h3>
</code>
</pre>
</div>
<div>
<h2>Protected Base Classes</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr><td><code><a href="#S1">S1</a></code></td><td><span></span></td></tr>
</tbody>
</table>
</div>


</div>
Expand Down
Loading
Loading