]> granicus.if.org Git - clang/commitdiff
Fix some test failures involving -ast-print.
authorEli Friedman <eli.friedman@gmail.com>
Sat, 30 May 2009 01:45:29 +0000 (01:45 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 30 May 2009 01:45:29 +0000 (01:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72605 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/StmtPrinter.cpp
lib/AST/Type.cpp

index a4271474729e7fe5d30da293fff110d1761d7e7a..113cbb48dde4cd5fd8900125693a998a4266c913 100644 (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)) {
index e63e12b3d66590edba96bded255f3efea05cc30e..f7eb41c28b320e7763fe1a81c7e83d11f8368fc6 100644 (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;