summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-07-14 23:41:35 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-07-14 23:41:35 +0000
commitdfbd05d8aa398141f171eba9926d0f48770fbbb6 (patch)
tree1d87c4dd9ab897a6888ed35a8f1943913591eb27 /clang/lib/AST/DeclPrinter.cpp
parentd1ea5393c916f08f059dbf363b0e2f91488daea0 (diff)
downloadbcm5719-llvm-dfbd05d8aa398141f171eba9926d0f48770fbbb6.tar.gz
bcm5719-llvm-dfbd05d8aa398141f171eba9926d0f48770fbbb6.zip
Added a FIXME and prevent crash when listing
a dependent type in the ctor initializer-list. llvm-svn: 75712
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index d417fbb7e8a..c7ad8d0a711 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/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 << "(";
OpenPOWER on IntegriCloud