Look through vector types when determining the base type of a type for declarator printing. Bug found via the PCH tester

llvm-svn: 74672
This commit is contained in:
Douglas Gregor 2009-07-01 23:58:14 +00:00
parent 02a9da33b3
commit 1554825e20
1 changed files with 2 additions and 0 deletions

View 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!");
}