[PATCH] Fix for PR 14965: Better error message for GEP with partially defined contents

Eli Bendersky eliben at google.com
Mon Apr 22 10:05:34 PDT 2013


On Mon, Apr 22, 2013 at 9:51 AM, Nadav Rotem <nrotem at apple.com> wrote:

> LGTM.
>
>
> +  Type *BaseType = Ptr->getType();
> +  PointerType *BasePointerType;
> +  if (!(BasePointerType =
> dyn_cast<PointerType>(BaseType->getScalarType())))
>
> I would write this as:
>
> PointerType *BasePointerType =
> dyn_cast<PointerType>(BaseType->getScalarType());
> if (!BasePointerType) ...
>

Thanks. r180030 - with your suggestion.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130422/66d6d22b/attachment.html>


More information about the llvm-commits mailing list