summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2017-07-13 21:08:29 +0000
committerLang Hames <lhames@gmail.com>2017-07-13 21:08:29 +0000
commitcce46bee7c8203bccb544defd1b2bf628d4df597 (patch)
tree6a7dcd914f1736ec5dd02fef405aa5f6388198fa /lib
parent3eb6d072ea2aa7f39e85c036f98201df1e65c56c (diff)
Use getNameAsString instead of getName to get method names when dumping
overrides: getName can fail if the decl's name isn't a simple identifier. This is a more general replacement for the fix in r305860. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTDumper.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp
index 4758109fbc..92ed7da94d 100644
--- a/lib/AST/ASTDumper.cpp
+++ b/lib/AST/ASTDumper.cpp
@@ -1189,12 +1189,8 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *D) {
auto dumpOverride =
[=](const CXXMethodDecl *D) {
SplitQualType T_split = D->getType().split();
- OS << D << " " << D->getParent()->getName() << "::";
- if (isa<CXXDestructorDecl>(D))
- OS << "~" << D->getParent()->getName();
- else
- OS << D->getName();
- OS << " '" << QualType::getAsString(T_split) << "'";
+ OS << D << " " << D->getParent()->getName() << "::"
+ << D->getNameAsString() << " '" << QualType::getAsString(T_split) << "'";
};
dumpChild([=] {