r305860 - Special-case handling of destructors in override lists when dumping ASTs.
Lang Hames via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 20 14:30:43 PDT 2017
Author: lhames
Date: Tue Jun 20 16:30:43 2017
New Revision: 305860
URL: http://llvm.org/viewvc/llvm-project?rev=305860&view=rev
Log:
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.
Modified:
cfe/trunk/lib/AST/ASTDumper.cpp
Modified: cfe/trunk/lib/AST/ASTDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDumper.cpp?rev=305860&r1=305859&r2=305860&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Tue Jun 20 16:30:43 2017
@@ -1189,9 +1189,12 @@ void ASTDumper::VisitFunctionDecl(const
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([=] {
More information about the cfe-commits
mailing list