Skip to content

Commit bec294a

Browse files
committed
fix: crash on unimplemented when populating overloads destructor entry
I am not sure why this is not seen in CI presently, but I can reproduce it when building mrdocs from the llvm version bundled in homebrew (currently 20.1.7).
1 parent 1a5b15a commit bec294a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/lib/Metadata/Finalizers/OverloadsFinalizer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ foldOverloads(SymbolID const& contextId, std::vector<SymbolID>& functionIds, boo
105105
MRDOCS_CHECK_OR_CONTINUE(recordInfoPtr);
106106
auto* function = recordInfoPtr->asFunctionPtr();
107107
MRDOCS_CHECK_OR_CONTINUE(function);
108+
MRDOCS_CHECK_OR_CONTINUE(function->Class != FunctionClass::Destructor);
108109

109110
// Check if the FunctionInfo is unique
110111
std::ranges::subrange otherFunctionIds(

src/lib/Metadata/Info/Overloads.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ merge(OverloadsInfo& I, OverloadsInfo&& Other)
4444
void
4545
addMember(OverloadsInfo& I, FunctionInfo const& Member)
4646
{
47+
MRDOCS_ASSERT(Member.Class != FunctionClass::Destructor);
48+
4749
if (I.Members.empty())
4850
{
4951
I.Name = Member.Name;

0 commit comments

Comments
 (0)