Special-case handling of destructors in override lists when dumping ASTs.

Fixes a bug in r305850: CXXDestructors don't have names, so we need to handle
printing of them separately.

llvm-svn: 305860
This commit is contained in:
Lang Hames 2017-06-20 21:30:43 +00:00
parent ccab11b0e8
commit 0d93185b2c
1 changed files with 6 additions and 3 deletions

View File

@ -1189,9 +1189,12 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *D) {
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([=] {