[cfe-commits] r69004 - in /cfe/trunk: lib/AST/ASTContext.cpp test/CodeGen/function-decay.m

Anders Carlsson andersca at mac.com
Mon Apr 13 17:12:29 PDT 2009


On Apr 13, 2009, at 5:03 PM, Steve Naroff wrote:

> -        if (!dyn_cast<ConstantArrayType>(AT))
> -          PType = PVDecl->getType();
> +          dyn_cast<ArrayType>(PType->getCanonicalTypeInternal())) {
> +      // Use array's original type only if it has known number of
> +      // elements.
> +      if (!dyn_cast<ConstantArrayType>(AT))
> +        PType = PVDecl->getType();

Not sure if you wrote the original code or not, but

> if (!dyn_cast<ConstantArrayType>(AT))

should be

if (!isa<ConstantArrayType>(AT))

Anders



More information about the cfe-commits mailing list