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

Eli Friedman eli.friedman at gmail.com
Tue Aug 7 20:47:16 PDT 2012


Author: efriedma
Date: Tue Aug  7 22:47:15 2012
New Revision: 161472

URL: http://llvm.org/viewvc/llvm-project?rev=161472&view=rev
Log:
Fix a -ast-dump crash.


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=161472&r1=161471&r2=161472&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Tue Aug  7 22:47:15 2012
@@ -114,6 +114,8 @@
       BaseType = FTy->getResultType();
     else if (const VectorType *VTy = BaseType->getAs<VectorType>())
       BaseType = VTy->getElementType();
+    else if (const ReferenceType *RTy = BaseType->getAs<ReferenceType>())
+      BaseType = RTy->getPointeeType();
     else
       llvm_unreachable("Unknown declarator!");
   }





More information about the cfe-commits mailing list