[PATCH][review request] Use ArrayRef in SemaInit.cpp. Try 3
Robert Wilhelm
robert.wilhelm at gmx.net
Fri May 3 07:09:35 PDT 2013
Thanks for the review.
Mutability is only needed in the ctor.
I have attached new updated patch.
Robert
On Fri, 2013-05-03 at 16:08 +0300, Dmitri Gribenko wrote:
> On Fri, May 3, 2013 at 3:59 PM, Robert Wilhelm <robert.wilhelm at gmx.net> wrote:
> > Hello David,
> >
> > This patch switches to ArrayRef in SemaInit.cpp.
>
> Are you sure that we want to use MultiExprArg? It is a
> MutableArrayRef instead of a plain ArrayRef:
>
> typedef llvm::MutableArrayRef<Expr*> MultiExprArg;
>
> Is mutability needed here?
>
> + for (unsigned I = 0, J= Args.size(); I != J; ++I)
>
> 'J' is not a good name for element count. Please rename J to E and
> add a space before '='.
>
> Expr *InitListAsExpr = InitList;
> - Expr **Args = InitList ? &InitListAsExpr : 0;
> - unsigned NumArgs = InitList ? 1 : 0;
> + MultiExprArg Args(&InitListAsExpr, InitList ? 1 : 0);
>
> No tabs, please.
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SemaInit_ArrayRef5.patch
Type: text/x-patch
Size: 39130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130503/87201735/attachment.bin>
More information about the cfe-commits
mailing list