[cfe-commits] r75712 - /cfe/trunk/lib/AST/DeclPrinter.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue Jul 14 16:41:49 PDT 2009
Author: fjahanian
Date: Tue Jul 14 18:41:35 2009
New Revision: 75712
URL: http://llvm.org/viewvc/llvm-project?rev=75712&view=rev
Log:
Added a FIXME and prevent crash when listing
a dependent type in the ctor initializer-list.
Modified:
cfe/trunk/lib/AST/DeclPrinter.cpp
Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=75712&r1=75711&r2=75712&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Tue Jul 14 18:41:35 2009
@@ -351,11 +351,12 @@
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 << "(";
More information about the cfe-commits
mailing list