Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 137cc09

Browse files
committedMar 13, 2025··
[FOLD]
1 parent 5b4eacb commit 137cc09

File tree

4 files changed

+1
-39
lines changed

4 files changed

+1
-39
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
enum {{#if isScoped}}class{{/if}}{{#if attributes}} {{>symbol/attributes symbol}}{{/if}} {{>symbol/name .~}}
1+
enum{{#if isScoped}} class{{/if}}{{#if attributes}} {{>symbol/attributes symbol}}{{/if}} {{>symbol/name .~}}
22
{{#if type}} : {{>type/declarator type}}{{/if}};

‎src/lib/AST/ASTVisitor.cpp

-36
Original file line numberDiff line numberDiff line change
@@ -1590,42 +1590,6 @@ populateAttributes(Info& I, Decl const* D)
15901590
break;
15911591
}
15921592
}
1593-
1594-
#if 0
1595-
if(D->hasAttr<DeprecatedAttr>())
1596-
addAttribute(I, AttributeKind::Deprecated);
1597-
1598-
if(D->hasAttr<UnusedAttr>())
1599-
addAttribute(I, AttributeKind::MaybeUnused);
1600-
1601-
if(D->hasAttr<WarnUnusedResultAttr>())
1602-
addAttribute(I, AttributeKind::Nodiscard);
1603-
1604-
if(D->hasAttr<NoReturnAttr>())
1605-
addAttribute(I, AttributeKind::Noreturn);
1606-
1607-
if(D->hasAttr<NoUniqueAddressAttr>())
1608-
addAttribute(I, AttributeKind::NoUniqueAddress);
1609-
#endif
1610-
1611-
#if 0
1612-
if constexpr (requires { I.Attributes; })
1613-
{
1614-
MRDOCS_CHECK_OR(D->hasAttrs());
1615-
for (Attr const* attr: D->getAttrs())
1616-
{
1617-
IdentifierInfo const* II = attr->getAttrName();
1618-
if (!II)
1619-
{
1620-
continue;
1621-
}
1622-
if (std::ranges::find(I.Attributes, II->getName()) == I.Attributes.end())
1623-
{
1624-
I.Attributes.emplace_back(II->getName());
1625-
}
1626-
}
1627-
}
1628-
#endif
16291593
}
16301594

16311595
void

‎test-files/golden-tests/symbols/function/attributes-2.adoc

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Declared in `&lt;attributes&hyphen;2&period;cpp&gt;`
2222
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
2323
----
2424
template&lt;class T&gt;
25-
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
2625
int
2726
f();
2827
----

‎test-files/golden-tests/symbols/function/attributes-2.html

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ <h3>Synopsis</h3>
3434
<pre>
3535
<code class="source-code cpp">
3636
template&lt;class T&gt;
37-
[[nodiscard]]
3837
int
3938
f();
4039
</code>

0 commit comments

Comments
 (0)
Please sign in to comment.