Skip to content

SpecializationInfo is unused #890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
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
1 change: 0 additions & 1 deletion include/mrdocs/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <mrdocs/Metadata/Info/NamespaceAlias.hpp>
#include <mrdocs/Metadata/Info/Overloads.hpp>
#include <mrdocs/Metadata/Info/Record.hpp>
#include <mrdocs/Metadata/Info/Specialization.hpp>
#include <mrdocs/Metadata/Info/Typedef.hpp>
#include <mrdocs/Metadata/Info/Variable.hpp>
#include <mrdocs/Metadata/Javadoc.hpp>
Expand Down
72 changes: 0 additions & 72 deletions include/mrdocs/Metadata/Info/Specialization.hpp

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/lib/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,17 +1106,6 @@ populate(
populateAttributes(I, D);
}

void
ASTVisitor::
populate(
SpecializationInfo& I,
ClassTemplateSpecializationDecl const* D)
{
CXXRecordDecl const* PD = getInstantiatedFrom(D);
populate(I.Args, D->getTemplateArgs().asArray());
generateID(PD, I.Primary);
}

void
ASTVisitor::
populate(
Expand Down
3 changes: 0 additions & 3 deletions src/lib/AST/ASTVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,6 @@ class ASTVisitor
void
populate(FieldInfo& I, FieldDecl const* D);

void
populate(SpecializationInfo& I, ClassTemplateSpecializationDecl const* D);

void
populate(FriendInfo& I, FriendDecl const* D);

Expand Down
4 changes: 0 additions & 4 deletions src/lib/Gen/hbs/VisitorHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ namespace clang::mrdocs::hbs {
bool
shouldGenerate(Info const& I, Config const& config)
{
if (I.isSpecialization())
{
return false;
}
if (I.isEnumConstant())
{
return false;
Expand Down
18 changes: 0 additions & 18 deletions src/lib/Gen/xml/XMLWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,24 +691,6 @@ closeTemplate(
tags_.close(templateTagName);
}

void
XMLWriter::
writeSpecialization(
SpecializationInfo const& I)
{
tags_.open(specializationTagName, {
{I.id},
{"primary", toBase64Str(I.Primary) }
});

for(auto const& targ : I.Args)
writeTemplateArg(*targ, tags_);

corpus_.traverse(I, *this);

tags_.close(specializationTagName);
}

//------------------------------------------------

void
Expand Down
34 changes: 0 additions & 34 deletions src/lib/Metadata/Info/Specialization.cpp

This file was deleted.

4 changes: 0 additions & 4 deletions src/lib/Metadata/InfoNodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
"name": "field",
"brief": "The symbol is a field"
},
{
"name": "specialization",
"brief": "The symbol is a template specialization"
},
{
"name": "friend",
"brief": "The symbol is a friend declaration"
Expand Down
11 changes: 5 additions & 6 deletions src/lib/Support/LegibleNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ getUnnamedInfoName(Info const& I)
"06typedef",
"07variable",
"08field",
"09specialization",
"08friend",
"12guide",
"12namespace-alias",
"13using",
"14concept"
"09friend",
"10guide",
"11namespace-alias",
"12using",
"13concept"
};
std::size_t const idx = to_underlying(I.Kind) - 1;
MRDOCS_ASSERT(idx < std::size(reserved));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class A;
|===
| Name
| Description
| <<A-08friend,`operator&equals;&equals;`>>
| <<A-09friend,`operator&equals;&equals;`>>
| Friend function not listed as non&hyphen;member
|===

Expand All @@ -60,7 +60,7 @@ class A;
| Non&hyphen;member function of A
|===

[#A-08friend]
[#A-09friend]
== operator&equals;&equals;

Friend function not listed as non&hyphen;member
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h2>Friends</h2>
</thead>
<tbody>
<tr>
<td><a href="#A-08friend"><code>operator&#x3D;&#x3D;</code></a> </td><td><span>Friend function not listed as non-member</span></td></tr>
<td><a href="#A-09friend"><code>operator&#x3D;&#x3D;</code></a> </td><td><span>Friend function not listed as non-member</span></td></tr>
</tbody>
</table>

Expand All @@ -90,7 +90,7 @@ <h2>Non-Member Functions</h2>
</div>
<div>
<div>
<h2 id="A-08friend">operator&#x3D;&#x3D;</h2>
<h2 id="A-09friend">operator&#x3D;&#x3D;</h2>
<div>
<span>Friend function not listed as non-member</span>

Expand Down
4 changes: 2 additions & 2 deletions test-files/golden-tests/symbols/friend/friend-1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ struct T;
|===
| Name
| Description
| <<T-08friend,`f`>>
| <<T-09friend,`f`>>
| f
|===

[#T-08friend]
[#T-09friend]
== f

f
Expand Down
4 changes: 2 additions & 2 deletions test-files/golden-tests/symbols/friend/friend-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h2>Friends</h2>
</thead>
<tbody>
<tr>
<td><a href="#T-08friend"><code>f</code></a> </td><td><span>f</span></td></tr>
<td><a href="#T-09friend"><code>f</code></a> </td><td><span>f</span></td></tr>
</tbody>
</table>

Expand All @@ -70,7 +70,7 @@ <h2>Friends</h2>
</div>
<div>
<div>
<h2 id="T-08friend">f</h2>
<h2 id="T-09friend">f</h2>
<div>
<span>f</span>

Expand Down
4 changes: 2 additions & 2 deletions test-files/golden-tests/symbols/friend/friend-2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ struct T;
|===
| Name
| Description
| <<T-08friend,`f`>>
| <<T-09friend,`f`>>
| f
|===

[#T-08friend]
[#T-09friend]
== f

f
Expand Down
4 changes: 2 additions & 2 deletions test-files/golden-tests/symbols/friend/friend-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h2>Friends</h2>
</thead>
<tbody>
<tr>
<td><a href="#T-08friend"><code>f</code></a> </td><td><span>f</span></td></tr>
<td><a href="#T-09friend"><code>f</code></a> </td><td><span>f</span></td></tr>
</tbody>
</table>

Expand All @@ -70,7 +70,7 @@ <h2>Friends</h2>
</div>
<div>
<div>
<h2 id="T-08friend">f</h2>
<h2 id="T-09friend">f</h2>
<div>
<span>f</span>

Expand Down
8 changes: 4 additions & 4 deletions test-files/golden-tests/symbols/friend/friend-3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ struct T;
|===
| Name
| Description
| <<T-08friend,`f`>>
| <<T-09friend,`f`>>
| T&colon;&colon;f
|===

[#T-08friend]
[#T-09friend]
== f

T&colon;&colon;f
Expand Down Expand Up @@ -78,10 +78,10 @@ struct U;
[cols=1]
|===
| Name
| <<U-08friend,`f`>>
| <<U-09friend,`f`>>
|===

[#U-08friend]
[#U-09friend]
== f

=== Synopsis
Expand Down
8 changes: 4 additions & 4 deletions test-files/golden-tests/symbols/friend/friend-3.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h2>Friends</h2>
</thead>
<tbody>
<tr>
<td><a href="#T-08friend"><code>f</code></a> </td><td><span>T::f</span></td></tr>
<td><a href="#T-09friend"><code>f</code></a> </td><td><span>T::f</span></td></tr>
</tbody>
</table>

Expand All @@ -71,7 +71,7 @@ <h2>Friends</h2>
</div>
<div>
<div>
<h2 id="T-08friend">f</h2>
<h2 id="T-09friend">f</h2>
<div>
<span>T::f</span>

Expand Down Expand Up @@ -113,7 +113,7 @@ <h2>Friends</h2>
</thead>
<tbody>
<tr>
<td><a href="#U-08friend"><code>f</code></a> </td></tr>
<td><a href="#U-09friend"><code>f</code></a> </td></tr>
</tbody>
</table>

Expand All @@ -122,7 +122,7 @@ <h2>Friends</h2>
</div>
<div>
<div>
<h2 id="U-08friend">f</h2>
<h2 id="U-09friend">f</h2>
</div>
<div>
<h3>Synopsis</h3>
Expand Down
Loading
Loading