Skip to content

Commit

Permalink
XMLWriter excludes dependencies
Browse files Browse the repository at this point in the history
#fix
  • Loading branch information
alandefreitas committed Jan 14, 2025
1 parent 8dba8cd commit 7c753ba
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 61 deletions.
7 changes: 7 additions & 0 deletions src/lib/Gen/xml/XMLWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ XMLWriter::
operator()(
T const& I)
{
Info const& base = I;
if (base.Extraction == ExtractionMode::Dependency)
{
return;
}


#define INFO(Type) if constexpr(T::is##Type()) write##Type(I);
#include <mrdocs/Metadata/InfoNodesPascal.inc>
}
Expand Down
11 changes: 0 additions & 11 deletions test-files/golden-tests/filters/symbol-name/blacklist_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@
<file path="blacklist_0.cpp" line="3"/>
<file path="blacklist_0.cpp" line="16"/>
</function>
<namespace name="N1_BL" id="jVE2p1i0UYk89pn+WDz4eo5TtqY=">
<function name="f1" id="GZOWK/jcE53ZZmWVzFx8XNJbbcw=">
<file path="blacklist_0.cpp" line="17"/>
</function>
</namespace>
<struct name="S0_BL" id="DQybmH4GmrFs/AMwQ8xUtIXTtFw=">
<file path="blacklist_0.cpp" line="10" class="def"/>
<function name="f2" id="MY6mDcv064Ns4eMtVO7GTdXsGMk=">
<file path="blacklist_0.cpp" line="18" class="def"/>
</function>
</struct>
</namespace>
<namespace name="N3" id="N8VuRKoz/jzHCbelCVCZNKALQAQ=">
</namespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
xsi:noNamespaceSchemaLocation="https://github.com/cppalliance/mrdocs/raw/develop/mrdocs.rnc">
<namespace id="//////////////////////////8=">
<namespace name="B" id="kPgq2AM8TvyGDGm5jEWfqYlOPmY=">
<namespace name="S" id="Rj2Fd5N7JujyJxCEKO4hXgEbuZE=">
<namespace name="E" id="3Bv76oUtQq1hnBVVkwioGwKa0oU=">
</namespace>
</namespace>
<namespace name="U" id="X48ZrJbrwHITObLn6vxlcgApA20=">
<namespace-alias name="E" id="TDj0Rc30uD7P5e+F1gsHzHoaV2U=">
<file path="excluded-namespace-alias.cpp" line="7"/>
Expand Down
37 changes: 0 additions & 37 deletions test-files/golden-tests/filters/symbol-name/extraction-mode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@
</para>
</doc>
</function>
<struct name="dependency" id="1L0CXReBnwnJJ+QMfbufLsSVX8Q=">
<file path="extraction-mode.cpp" line="89" class="def"/>
<doc>
<para>
<text>An excluded symbol used as a dependency by a regular symbol</text>
</para>
<para>
<text>A symbol excluded by filters but is used as a dependency The symbol should be extracted as a dependency but its</text>
<text> members should not be traversed.</text>
</para>
</doc>
</struct>
<function name="get_dependency" id="JsA4nL3r830aRrxkYOJehKibEWE=">
<file path="extraction-mode.cpp" line="102" class="def"/>
<return>
Expand Down Expand Up @@ -200,21 +188,6 @@
</para>
</doc>
</function>
<struct name="dependency" id="CyWO4Tsh/ybq2vl/ylZdyGSc20U=">
<file path="extraction-mode.cpp" line="174" class="def"/>
<doc>
<para>
<text>A dependency symbol in a see-below namespace</text>
</para>
<para>
<text>The symbol should be extracted as a dependency because the exclude filter has precedence over the see-below filter.</text>
<text> Only included symbols can be promoted to see-below.</text>
</para>
<para>
<text>This will not have a page and functions using this symbol should explain the dependency.</text>
</para>
</doc>
</struct>
<function name="get_dependency" id="a9NW/0+lwniKyNoc79ktu9ydz9Q=">
<file path="extraction-mode.cpp" line="184" class="def"/>
<return>
Expand Down Expand Up @@ -265,8 +238,6 @@
</doc>
<aliased name="implementation_defined_ns" id="ZYn+worzOdzCMW6yaZC9jAkpVTk="/>
</namespace-alias>
<namespace name="dependency_ns" id="FVHkx2YC1v9lxjwdG5D+M2e5SIA=">
</namespace>
<namespace-alias name="dependency_ns_alias" id="iz2edsTj1BrHatwuxuBXSOfqpDE=">
<file path="extraction-mode.cpp" line="233"/>
<doc>
Expand Down Expand Up @@ -375,14 +346,6 @@
</para>
</doc>
</function>
<struct name="dependency" id="t1gs2ps85mDDF3gcK68GCS5x23g=">
<file path="extraction-mode.cpp" line="307" class="def"/>
<doc>
<para>
<text>A dependency symbol in the global namespace</text>
</para>
</doc>
</struct>
<function name="get_dependency" id="TDPbPaUgAt15wH9Aq054dH6qByE=">
<file path="extraction-mode.cpp" line="313" class="def"/>
<return>
Expand Down
9 changes: 0 additions & 9 deletions test-files/golden-tests/metadata/sfinae.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@
</doc>
</function>
</template>
<namespace name="std" id="eIvg7iueGIPcE8p1NVfngsp2ojw=">
<namespace name="__1" id="/ppH3Z0ubmO1O4tQMYNyXcdud94=" is-inline="1">
<namespace-alias name="size_t" id="1rC7g2lG/OJ9bbXPgmsHoNh6P1I=">
<file path="C:/Users/aland/Libraries/llvm/DebWithOpt/include/c++/v1/__cstddef/size_t.h" line="20"/>
<type class="decltype" operand="sizeof(int)">
</type>
</namespace-alias>
</namespace>
</namespace>
<template>
<tparam name="T" class="type"/>
<function name="f3" id="yaTxDD+pmbRpvP/UNyNCs9xvpQo=">
Expand Down

0 comments on commit 7c753ba

Please sign in to comment.