aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-01 23:58:14 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-01 23:58:14 +0000
commit5068ab669970ba62020541251f1193b237d24ae3 (patch)
tree1fa31478d32569a8de92080d242393be991fd83f /lib/AST/DeclPrinter.cpp
parent73b85f3d7ccdff37bab7adafc6b06dfd03740058 (diff)
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
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r--lib/AST/DeclPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
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!");
}