[cfe-commits] r63517 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/struct-decl.c

Eli Friedman eli.friedman at gmail.com
Mon Feb 2 13:00:01 PST 2009


On Mon, Feb 2, 2009 at 7:00 AM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
> -  if (Res > llvm::APSInt(Res.getBitWidth(), Res.isUnsigned()))
> -    return Context.getConstantArrayType(VLATy->getElementType(),
> -                                        Res, ArrayType::Normal, 0);
> -  return QualType();
> +
> +  return Context.getConstantArrayType(VLATy->getElementType(),
> +                                      Res, ArrayType::Normal, 0);
>  }

We do not want to be letting though negative numbers here; instead of
eliminating the check completely, we should explicitly check for Res
== 0.

-Eli



More information about the cfe-commits mailing list