aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-30 01:45:29 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-30 01:45:29 +0000
commitc8f2c61f4f667c2bc3e4e74b274fa397a4232393 (patch)
treeef6239f9612006b4f122161a126a8737baec5830
parent64f650062fbe5e2bc6fb6d341c46a2ec0284694f (diff)
Fix some test failures involving -ast-print.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72605 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/StmtPrinter.cpp5
-rw-r--r--lib/AST/Type.cpp10
2 files changed, 15 insertions, 0 deletions
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<TypedefDecl>(*Begin))
OS << "typedef ";
else if (VarDecl *V = dyn_cast<VarDecl>(*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;