Fix some test failures involving -ast-print.

llvm-svn: 72605
This commit is contained in:
Eli Friedman 2009-05-30 01:45:29 +00:00
parent 09f17a8479
commit 258ffef5b5
2 changed files with 15 additions and 0 deletions

View File

@ -255,6 +255,11 @@ void StmtPrinter::PrintRawDeclStmt(DeclStmt *S) {
if (TD)
++Begin;
if (Begin == End) {
PrintRawDecl(TD);
return;
}
if (isa<TypedefDecl>(*Begin))
OS << "typedef ";
else if (VarDecl *V = dyn_cast<VarDecl>(*Begin)) {

View File

@ -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;