diff --git a/docs/modules/ROOT/pages/commands.adoc b/docs/modules/ROOT/pages/commands.adoc index 2f865b4848..76f8d0cd9e 100644 --- a/docs/modules/ROOT/pages/commands.adoc +++ b/docs/modules/ROOT/pages/commands.adoc @@ -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... @@ -96,4 +97,3 @@ The following commands can be used to format the text in the doc comments: // ("::")n // === Links to external documentation // Tagfiles + @ref - diff --git a/src/lib/AST/ASTVisitor.cpp b/src/lib/AST/ASTVisitor.cpp index debe004863..2c66282821 100644 --- a/src/lib/AST/ASTVisitor.cpp +++ b/src/lib/AST/ASTVisitor.cpp @@ -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); } diff --git a/test-files/golden-tests/symbols/using/using-function-excluded.adoc b/test-files/golden-tests/symbols/using/using-function-excluded.adoc index e7a2cf461b..cc16ff33bd 100644 --- a/test-files/golden-tests/symbols/using/using-function-excluded.adoc +++ b/test-files/golden-tests/symbols/using/using-function-excluded.adoc @@ -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 `<using‐function‐excluded.cpp>` - -[source,cpp,subs="verbatim,replacements,macros,-callouts"] ----- -void -f(int); ----- - [#f] == f +Using excluded function f + === Synopsis Declared in `<using‐function‐excluded.cpp>` @@ -56,12 +28,11 @@ Declared in `<using‐function‐excluded.cpp>` using A::f; ---- -=== Introduced Symbols +=== Description + +No shadow should be listed because A::f is excluded. + +Only included symbols are listed in the shadow list. -[cols=1] -|=== -| Name -| link:#A-f[A::f] -|=== [.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/golden-tests/symbols/using/using-function-excluded.cpp b/test-files/golden-tests/symbols/using/using-function-excluded.cpp index 9180d5ca2b..ca87aac00a 100644 --- a/test-files/golden-tests/symbols/using/using-function-excluded.cpp +++ b/test-files/golden-tests/symbols/using/using-function-excluded.cpp @@ -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; diff --git a/test-files/golden-tests/symbols/using/using-function-excluded.html b/test-files/golden-tests/symbols/using/using-function-excluded.html index 992c050611..16e044bcd5 100644 --- a/test-files/golden-tests/symbols/using/using-function-excluded.html +++ b/test-files/golden-tests/symbols/using/using-function-excluded.html @@ -9,72 +9,30 @@

Reference

-

Namespaces

- - - - - - - - - - -
Name
A
-

Using Declarations

+ - +
NameDescription
f
f Using excluded function f
-

A

-
-

Functions

- - - - - - - - - - -
Name
f
- -
-
-
-

A::f

-
-
-

Synopsis

+

f

-Declared in <using-function-excluded.cpp>
-
-void
-f(int);
+Using excluded function f
 
-
-
-
-

f

-
-

Synopsis

Declared in <using-function-excluded.cpp>
@@ -85,21 +43,10 @@

Synopsis

-

Introduced Symbols

- - - - - - - - - - - -
Name
A::f
+

Description

+

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

+

Only included symbols are listed in the shadow list.

-
diff --git a/test-files/golden-tests/symbols/using/using-function-excluded.xml b/test-files/golden-tests/symbols/using/using-function-excluded.xml index 27b48b6e87..fed4901256 100644 --- a/test-files/golden-tests/symbols/using/using-function-excluded.xml +++ b/test-files/golden-tests/symbols/using/using-function-excluded.xml @@ -2,17 +2,19 @@ - - - - - - - - - - + + + + Using excluded function f + + + No shadow should be listed because A::f is excluded. + + + Only included symbols are listed in the shadow list. + + diff --git a/test-files/golden-tests/symbols/using/using-function-excluded.yml b/test-files/golden-tests/symbols/using/using-function-excluded.yml new file mode 100644 index 0000000000..354f1c8f9d --- /dev/null +++ b/test-files/golden-tests/symbols/using/using-function-excluded.yml @@ -0,0 +1,2 @@ +exclude-symbols: + - 'A::f' \ No newline at end of file