From: Fariborz Jahanian Date: Tue, 14 Jul 2009 23:41:35 +0000 (+0000) Subject: Added a FIXME and prevent crash when listing X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29146add4c9952f79b82b7f3d1f0bf0d4cb0e17e;p=clang Added a FIXME and prevent crash when listing a dependent type in the ctor initializer-list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75712 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(RT->getDecl()); - Out << BaseDecl->getNameAsString(); + else // FIXME. skip dependent types for now. + if (const RecordType *RT = + BMInitializer->getBaseClass()->getAsRecordType()) { + const CXXRecordDecl *BaseDecl = + cast(RT->getDecl()); + Out << BaseDecl->getNameAsString(); } if (hasArguments) { Out << "(";