On Wed, May 15, 2013 at 9:29 PM, Richard Smith <[email protected]> wrote: > On Wed, May 15, 2013 at 4:08 AM, Hans Wennborg <[email protected]> wrote: >> >> On Tue, May 14, 2013 at 9:37 PM, Richard Smith <[email protected]> >> wrote: >> > @@ -79,7 +117,7 @@ static Expr *IsStringInit(Expr *init, QualType >> > declType, >> > ASTContext &Context) { >> > const ArrayType *arrayType = Context.getAsArrayType(declType); >> > if (!arrayType) return 0; >> > >> > - return IsStringInit(init, arrayType, Context); >> > + return IsStringInit(init, arrayType, Context) == SIF_None ? init : 0; >> > >> > Looks like the one and only caller of this doesn't actually want the >> > expression; maybe just return the SIF value here too? >> >> I've changed it to just return bool since that's really what the >> caller is looking for. > > The overload set for IsStringInit is now pretty scary: one overload returns > zero (as an enum) on success and the other returns true, and the only > difference in their signatures is that one takes a 'const ArrayType*' where > the other takes a 'QualType'. Please make them both return the same type.
Good point. Fixed in r181995. Thanks, Hans _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
