]> granicus.if.org Git - clang/commitdiff
Look through vector types when determining the base type of a type for declarator...
authorDouglas Gregor <dgregor@apple.com>
Wed, 1 Jul 2009 23:58:14 +0000 (23:58 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 1 Jul 2009 23:58:14 +0000 (23:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74672 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclPrinter.cpp

index ca25ed2dba0e67a1bfda2530682de767262214d2..12e89cd80d1978bdd9d1742cfb6b27c7b9a1637d 100644 (file)
@@ -96,6 +96,8 @@ static QualType GetBaseType(QualType T) {
       BaseType = ATy->getElementType();
     else if (const FunctionType* FTy = BaseType->getAsFunctionType())
       BaseType = FTy->getResultType();
+    else if (const VectorType *VTy = BaseType->getAsVectorType())
+      BaseType = VTy->getElementType();
     else
       assert(0 && "Unknown declarator!");
   }