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
32 changes: 16 additions & 16 deletions docs/modules/ROOT/pages/commands.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,22 @@ static constexpr int hours_in_day = 24;
Both the class and the function above have doc comments with a brief sentence and a detailed description.
Most doc comments will contain these two sections, which could also be explicitly marked with `@brief` and `@details` commands.

Doc comments can also contain a number of special commands such as `@param` that are used to document the parameters of a function.

== Style

The following commands can be used to format the text in the doc comments:

|===
| Command | Description
| `@a` | Formats the text in italics
| `@e` | Formats the text in italics
| `@em` | Formats the text in italics
| `@b` | Formats the text in bold
| `@strong` | Formats the text in bold
|
|===
Doc comments can also contain many special commands, such as `@param`, that are used to document the parameters of a function.
Mr. Docs supports most commands commonly used in Javadoc and Doxygen comments.

// == Style
//
// The following commands can be used to format the text in the doc comments:
//
// |===
// | Command | Description
// | `@a` | Formats the text in italics
// | `@e` | Formats the text in italics
// | `@em` | Formats the text in italics
// | `@b` | Formats the text in bold
// | `@strong` | Formats the text in bold
// |
// |===

// == Documentation at other places
// @class, @struct, @union, @enum, @fn, @var, @def, @typedef, @file, @namespace...
Expand Down Expand Up @@ -96,4 +97,3 @@ The following commands can be used to format the text in the doc comments:
// (<className>"::")n<functionName>
// === Links to external documentation
// Tagfiles + @ref

5 changes: 4 additions & 1 deletion src/lib/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,10 @@ populate(
{
ScopeExitRestore s(mode_, Dependency);
Decl* S = UDS->getTargetDecl();
if (Info* SI = findOrTraverse(S))
using enum ExtractionMode;
if (Info* SI = findOrTraverse(S);
SI &&
!is_one_of(SI->Extraction,{Dependency, ImplementationDefined}))
{
I.ShadowDeclarations.emplace_back(SI->id);
}
Expand Down
49 changes: 10 additions & 39 deletions test-files/golden-tests/symbols/using/using-function-excluded.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,21 @@
[#index]
== Global namespace

=== Namespaces

[cols=1]
|===
| Name
| link:#A[`A`]
|===

=== Using Declarations

[cols=1]
[cols=2]
|===
| Name
| Description
| link:#f[`f`]
| Using excluded function f
|===

[#A]
== A

=== Functions

[cols=1]
|===
| Name
| link:#A-f[`f`]
|===

[#A-f]
== link:#A[A]::f

=== Synopsis

Declared in `&lt;using&hyphen;function&hyphen;excluded&period;cpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
f(int);
----

[#f]
== f

Using excluded function f

=== Synopsis

Declared in `&lt;using&hyphen;function&hyphen;excluded&period;cpp&gt;`
Expand All @@ -56,12 +28,11 @@ Declared in `&lt;using&hyphen;function&hyphen;excluded&period;cpp&gt;`
using A::f;
----

=== Introduced Symbols
=== Description

No shadow should be listed because A&colon;&colon;f is excluded&period;

Only included symbols are listed in the shadow list&period;

[cols=1]
|===
| Name
| link:#A-f[A::f]
|===

[.small]#Created with https://www.mrdocs.com[MrDocs]#
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
namespace A
{
// This symbol is excluded.
void f(int);
}

/** Using excluded function f

No shadow should be listed because A::f is excluded.

Only included symbols are listed in the shadow list.
*/
using A::f;

67 changes: 7 additions & 60 deletions test-files/golden-tests/symbols/using/using-function-excluded.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,72 +9,30 @@ <h1>Reference</h1>
<div>
<h2 id="index"><a href="#index"></a></h2>
</div>
<h2>Namespaces</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#A"><code>A</code></a> </td></tr>
</tbody>
</table>

<h2>Using Declarations</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#f"><code>f</code></a> </td></tr>
<td><a href="#f"><code>f</code></a> </td><td><span>Using excluded function f</span></td></tr>
</tbody>
</table>

</div>
<div>
<div>
<h2 id="A"><a href="#A">A</a></h2>
</div>
<h2>Functions</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#A-f"><code>f</code></a> </td></tr>
</tbody>
</table>

</div>
<div>
<div>
<h2 id="A-f"><a href="#A-f">A::f</a></h2>
</div>
<div>
<h3>Synopsis</h3>
<h2 id="f"><a href="#f">f</a></h2>
<div>
Declared in <code>&lt;using-function-excluded.cpp&gt;</code></div>
<pre>
<code class="source-code cpp">void
f(int);
<span>Using excluded function f</span>

</code>
</pre>
</div>
</div>
<div>
<div>
<h2 id="f"><a href="#f">f</a></h2>
</div>
<div>
<h3>Synopsis</h3>
<div>
Declared in <code>&lt;using-function-excluded.cpp&gt;</code></div>
Expand All @@ -85,21 +43,10 @@ <h3>Synopsis</h3>
</pre>
</div>
<div>
<h3>Introduced Symbols</h3>
<table>
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#A-f">A::f</a></td>
</tr>
</tbody>
</table>
<h3>Description</h3>
<p>No shadow should be listed because A::f is excluded.</p>
<p>Only included symbols are listed in the shadow list.</p>
</div>

</div>

</div>
Expand Down
22 changes: 12 additions & 10 deletions test-files/golden-tests/symbols/using/using-function-excluded.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
<mrdocs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://github.com/cppalliance/mrdocs/raw/develop/mrdocs.rnc">
<namespace id="//////////////////////////8=">
<namespace name="A" id="jQQu/8mLNzRQvGtbkKMwwloVDpw=">
<function name="f" id="FuaTgMW0VtO+b4uzr/DCmx9vlb0=">
<file short-path="using-function-excluded.cpp" source-path="using-function-excluded.cpp" line="3"/>
<param>
<type name="int"/>
</param>
</function>
</namespace>
<using id="FhSdC4kR2+KOxLCiCUQ9mu1WNoY=" class="using" qualifier="A::f">
<file short-path="using-function-excluded.cpp" source-path="using-function-excluded.cpp" line="6"/>
<named id="FuaTgMW0VtO+b4uzr/DCmx9vlb0="/>
<file short-path="using-function-excluded.cpp" source-path="using-function-excluded.cpp" line="13"/>
<doc>
<brief>
<text>Using excluded function f</text>
</brief>
<para>
<text>No shadow should be listed because A::f is excluded.</text>
</para>
<para>
<text>Only included symbols are listed in the shadow list.</text>
</para>
</doc>
</using>
</namespace>
</mrdocs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude-symbols:
- 'A::f'
Loading