From 1554825e20e104e17b5a4a190a058d77f08c3f96 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 1 Jul 2009 23:58:14 +0000 Subject: Look through vector types when determining the base type of a type for declarator printing. Bug found via the PCH tester llvm-svn: 74672 --- clang/lib/AST/DeclPrinter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/AST') diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index ca25ed2dba0..12e89cd80d1 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/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!"); } -- cgit v1.2.3