Fixes a bug in r305850: CXXDestructors don't have names, so we need to handle
printing of them separately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305860
91177308-0d34-0410-b5e6-
96231b3b80d8
auto dumpOverride =
[=](const CXXMethodDecl *D) {
SplitQualType T_split = D->getType().split();
- OS << D << " " << D->getParent()->getName() << "::"
- << D->getName() << " '"
- << QualType::getAsString(T_split) << "'";
+ OS << D << " " << D->getParent()->getName() << "::";
+ if (isa<CXXDestructorDecl>(D))
+ OS << "~" << D->getParent()->getName();
+ else
+ OS << D->getName();
+ OS << " '" << QualType::getAsString(T_split) << "'";
};
dumpChild([=] {