[PATCH][review request] Use ArrayRef in SemaInit.cpp. Try 2
Dmitri Gribenko
gribozavr at gmail.com
Fri May 3 06:08:59 PDT 2013
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>*/
More information about the cfe-commits
mailing list