From: Douglas Gregor Date: Wed, 1 Jul 2009 23:58:14 +0000 (+0000) Subject: Look through vector types when determining the base type of a type for declarator... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5068ab669970ba62020541251f1193b237d24ae3;p=clang Look through vector types when determining the base type of a type for declarator printing. Bug found via the PCH tester git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74672 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index ca25ed2dba..12e89cd80d 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -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!"); }