From c8f2c61f4f667c2bc3e4e74b274fa397a4232393 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 30 May 2009 01:45:29 +0000 Subject: [PATCH] Fix some test failures involving -ast-print. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72605 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/StmtPrinter.cpp | 5 +++++ lib/AST/Type.cpp | 10 ++++++++++ 2 files changed, 15 insertions(+) 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; -- 2.40.0