Skip to content

Commit 22d54d7

Browse files
committed
XMLWriter excludes dependencies
#fix
1 parent 5972f64 commit 22d54d7

File tree

4 files changed

+7
-52
lines changed

4 files changed

+7
-52
lines changed

src/lib/Gen/xml/XMLWriter.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ XMLWriter::
195195
operator()(
196196
T const& I)
197197
{
198+
Info const& base = I;
199+
if (base.Extraction == ExtractionMode::Dependency)
200+
{
201+
return;
202+
}
203+
204+
198205
#define INFO(Type) if constexpr(T::is##Type()) write##Type(I);
199206
#include <mrdocs/Metadata/InfoNodesPascal.inc>
200207
}

test-files/golden-tests/filters/symbol-name/blacklist_0.xml

-11
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@
77
<file path="blacklist_0.cpp" line="3"/>
88
<file path="blacklist_0.cpp" line="16"/>
99
</function>
10-
<namespace name="N1_BL" id="jVE2p1i0UYk89pn+WDz4eo5TtqY=">
11-
<function name="f1" id="GZOWK/jcE53ZZmWVzFx8XNJbbcw=">
12-
<file path="blacklist_0.cpp" line="17"/>
13-
</function>
14-
</namespace>
15-
<struct name="S0_BL" id="DQybmH4GmrFs/AMwQ8xUtIXTtFw=">
16-
<file path="blacklist_0.cpp" line="10" class="def"/>
17-
<function name="f2" id="MY6mDcv064Ns4eMtVO7GTdXsGMk=">
18-
<file path="blacklist_0.cpp" line="18" class="def"/>
19-
</function>
20-
</struct>
2110
</namespace>
2211
<namespace name="N3" id="N8VuRKoz/jzHCbelCVCZNKALQAQ=">
2312
</namespace>

test-files/golden-tests/filters/symbol-name/excluded-namespace-alias.xml

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
xsi:noNamespaceSchemaLocation="https://github.com/cppalliance/mrdocs/raw/develop/mrdocs.rnc">
44
<namespace id="//////////////////////////8=">
55
<namespace name="B" id="kPgq2AM8TvyGDGm5jEWfqYlOPmY=">
6-
<namespace name="S" id="Rj2Fd5N7JujyJxCEKO4hXgEbuZE=">
7-
<namespace name="E" id="3Bv76oUtQq1hnBVVkwioGwKa0oU=">
8-
</namespace>
9-
</namespace>
106
<namespace name="U" id="X48ZrJbrwHITObLn6vxlcgApA20=">
117
<namespace-alias name="E" id="TDj0Rc30uD7P5e+F1gsHzHoaV2U=">
128
<file path="excluded-namespace-alias.cpp" line="7"/>

test-files/golden-tests/filters/symbol-name/extraction-mode.xml

-37
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,6 @@
107107
</para>
108108
</doc>
109109
</function>
110-
<struct name="dependency" id="1L0CXReBnwnJJ+QMfbufLsSVX8Q=">
111-
<file path="extraction-mode.cpp" line="89" class="def"/>
112-
<doc>
113-
<para>
114-
<text>An excluded symbol used as a dependency by a regular symbol</text>
115-
</para>
116-
<para>
117-
<text>A symbol excluded by filters but is used as a dependency The symbol should be extracted as a dependency but its</text>
118-
<text> members should not be traversed.</text>
119-
</para>
120-
</doc>
121-
</struct>
122110
<function name="get_dependency" id="JsA4nL3r830aRrxkYOJehKibEWE=">
123111
<file path="extraction-mode.cpp" line="102" class="def"/>
124112
<return>
@@ -200,21 +188,6 @@
200188
</para>
201189
</doc>
202190
</function>
203-
<struct name="dependency" id="CyWO4Tsh/ybq2vl/ylZdyGSc20U=">
204-
<file path="extraction-mode.cpp" line="174" class="def"/>
205-
<doc>
206-
<para>
207-
<text>A dependency symbol in a see-below namespace</text>
208-
</para>
209-
<para>
210-
<text>The symbol should be extracted as a dependency because the exclude filter has precedence over the see-below filter.</text>
211-
<text> Only included symbols can be promoted to see-below.</text>
212-
</para>
213-
<para>
214-
<text>This will not have a page and functions using this symbol should explain the dependency.</text>
215-
</para>
216-
</doc>
217-
</struct>
218191
<function name="get_dependency" id="a9NW/0+lwniKyNoc79ktu9ydz9Q=">
219192
<file path="extraction-mode.cpp" line="184" class="def"/>
220193
<return>
@@ -265,8 +238,6 @@
265238
</doc>
266239
<aliased name="implementation_defined_ns" id="ZYn+worzOdzCMW6yaZC9jAkpVTk="/>
267240
</namespace-alias>
268-
<namespace name="dependency_ns" id="FVHkx2YC1v9lxjwdG5D+M2e5SIA=">
269-
</namespace>
270241
<namespace-alias name="dependency_ns_alias" id="iz2edsTj1BrHatwuxuBXSOfqpDE=">
271242
<file path="extraction-mode.cpp" line="233"/>
272243
<doc>
@@ -375,14 +346,6 @@
375346
</para>
376347
</doc>
377348
</function>
378-
<struct name="dependency" id="t1gs2ps85mDDF3gcK68GCS5x23g=">
379-
<file path="extraction-mode.cpp" line="307" class="def"/>
380-
<doc>
381-
<para>
382-
<text>A dependency symbol in the global namespace</text>
383-
</para>
384-
</doc>
385-
</struct>
386349
<function name="get_dependency" id="TDPbPaUgAt15wH9Aq054dH6qByE=">
387350
<file path="extraction-mode.cpp" line="313" class="def"/>
388351
<return>

0 commit comments

Comments
 (0)