Skip to content

Commit 05f41bf

Browse files
committed
abstract class detection wasn't considering pure virtual dtor.
1 parent 918e1e6 commit 05f41bf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cppdom.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,22 @@ bool CppCompound::isAbstract() const
7171
{
7272
if (mem->objType_ == kFunction)
7373
{
74-
auto func = (CppFunction*) mem;
74+
auto func = static_cast<const CppFunction*>(mem);
7575
if (func->isPureVirtual())
7676
{
7777
isAbstract_ = true;
7878
break;
7979
}
8080
}
81+
else if (mem->objType_ == kDestructor)
82+
{
83+
auto dtor = static_cast<const CppDestructor*>(mem);
84+
if (dtor->isPureVirtual())
85+
{
86+
isAbstract_ = true;
87+
break;
88+
}
89+
}
8190
}
8291
return *isAbstract_;
8392
}

0 commit comments

Comments
 (0)