[cfe-commits] r74115 - /cfe/trunk/lib/AST/Type.cpp

Anders Carlsson andersca at mac.com
Wed Jun 24 14:00:07 PDT 2009


Author: andersca
Date: Wed Jun 24 15:59:53 2009
New Revision: 74115

URL: http://llvm.org/viewvc/llvm-project?rev=74115&view=rev
Log:
Type::getDesugaredType needs to handle decltype types.

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

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

==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Wed Jun 24 15:59:53 2009
@@ -112,6 +112,8 @@
     return TOE->getUnderlyingExpr()->getType().getDesugaredType();
   if (const TypeOfType *TOT = dyn_cast<TypeOfType>(this))
     return TOT->getUnderlyingType().getDesugaredType();
+  if (const DecltypeType *DTT = dyn_cast<DecltypeType>(this))
+    return DTT->getUnderlyingExpr()->getType().getDesugaredType();
   if (const TemplateSpecializationType *Spec 
         = dyn_cast<TemplateSpecializationType>(this)) {
     if (ForDisplay)





More information about the cfe-commits mailing list