[cfe-commits] r74672 - /cfe/trunk/lib/AST/DeclPrinter.cpp

Douglas Gregor dgregor at apple.com
Wed Jul 1 16:58:15 PDT 2009


Author: dgregor
Date: Wed Jul  1 18:58:14 2009
New Revision: 74672

URL: http://llvm.org/viewvc/llvm-project?rev=74672&view=rev
Log:
Look through vector types when determining the base type of a type for declarator printing. Bug found via the PCH tester

Modified:
    cfe/trunk/lib/AST/DeclPrinter.cpp

Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=74672&r1=74671&r2=74672&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Wed Jul  1 18:58:14 2009
@@ -96,6 +96,8 @@
       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!");
   }





More information about the cfe-commits mailing list