[cfe-commits] r75175 - in /cfe/trunk: lib/AST/Type.cpp test/SemaCXX/decltype-crash.cpp

Eli Friedman eli.friedman at gmail.com
Thu Jul 9 15:19:29 PDT 2009


On Thu, Jul 9, 2009 at 3:00 PM, Anders Carlsson<andersca at mac.com> wrote:
> --- cfe/trunk/lib/AST/Type.cpp (original)
> +++ cfe/trunk/lib/AST/Type.cpp Thu Jul  9 17:00:53 2009
> @@ -125,7 +125,7 @@
>   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();
> +    return DTT->getCanonicalTypeInternal();
>   if (const TemplateSpecializationType *Spec
>         = dyn_cast<TemplateSpecializationType>(this)) {
>     if (ForDisplay)

This looks very wrong: instead of desugaring the top-level type, this
completely destroys all non-canonical type information.

-Eli




More information about the cfe-commits mailing list