diff options
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index d417fbb7e8..c7ad8d0a71 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -351,11 +351,12 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { FieldDecl *FD = BMInitializer->getMember(); Out << FD->getNameAsString(); } - else { - const RecordType *RT = - BMInitializer->getBaseClass()->getAsRecordType(); - const CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(RT->getDecl()); - Out << BaseDecl->getNameAsString(); + else // FIXME. skip dependent types for now. + if (const RecordType *RT = + BMInitializer->getBaseClass()->getAsRecordType()) { + const CXXRecordDecl *BaseDecl = + cast<CXXRecordDecl>(RT->getDecl()); + Out << BaseDecl->getNameAsString(); } if (hasArguments) { Out << "("; |