Skip to content

Commit 398bd63

Browse files
committed
fix: UsingSymbol is SymbolParent
1 parent 6b0206c commit 398bd63

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

include/mrdocs/Corpus.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class MRDOCS_VISIBLE
215215
void
216216
traverse(TraverseOptions const& opts, T const& I, F&& f, Args&&... args) const
217217
{
218-
if constexpr (SymbolParent<T>)
218+
if constexpr (SymbolParent<T> && !std::same_as<T, UsingSymbol>)
219219
{
220220
if (!opts.ordered)
221221
{

include/mrdocs/Metadata/Symbol/Using.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ tag_invoke(
174174
v = dom::LazyObject(I, domCorpus);
175175
}
176176

177+
inline
178+
auto&
179+
allMembers(UsingSymbol const& T)
180+
{
181+
return T.ShadowDeclarations;
182+
}
183+
184+
static_assert(SymbolParent<UsingSymbol>);
185+
177186
} // mrdocs
178187

179188
#endif // MRDOCS_API_METADATA_SYMBOL_USING_HPP

src/lib/AST/ASTVisitor.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,13 @@ addMember(OverloadsSymbol& I, Symbol const& Member) const
19041904
I.Name);
19051905
}
19061906

1907+
void
1908+
ASTVisitor::
1909+
addMember(UsingSymbol& I, Symbol const& Member) const
1910+
{
1911+
addMember(I.ShadowDeclarations, Member);
1912+
}
1913+
19071914
void
19081915
ASTVisitor::
19091916
addMember(std::vector<SymbolID>& container, Symbol const& Member) const

src/lib/AST/ASTVisitor.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,9 @@ class ASTVisitor
759759
void
760760
addMember(OverloadsSymbol& I, Symbol const& Member) const;
761761

762+
void
763+
addMember(UsingSymbol& I, Symbol const& Member) const;
764+
762765
void
763766
addMember(std::vector<SymbolID>& container, Symbol const& Member) const;
764767

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
warn-if-undoc-enum-val: false

0 commit comments

Comments
 (0)