From: Eli Friedman Date: Sat, 30 May 2009 01:45:29 +0000 (+0000) Subject: Fix some test failures involving -ast-print. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8f2c61f4f667c2bc3e4e74b274fa397a4232393;p=clang Fix some test failures involving -ast-print. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72605 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index a427147472..113cbb48dd 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -255,6 +255,11 @@ void StmtPrinter::PrintRawDeclStmt(DeclStmt *S) { if (TD) ++Begin; + if (Begin == End) { + PrintRawDecl(TD); + return; + } + if (isa(*Begin)) OS << "typedef "; else if (VarDecl *V = dyn_cast(*Begin)) { diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index e63e12b3d6..f7eb41c28b 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -903,6 +903,16 @@ bool Type::isSpecifierType() const { case Record: case Enum: case Typedef: + case Complex: + case TypeOfExpr: + case TypeOf: + case TemplateTypeParm: + case TemplateSpecialization: + case QualifiedName: + case Typename: + case ObjCInterface: + case ObjCQualifiedInterface: + case ObjCQualifiedId: return true; default: return false;