On Tue, Jun 14, 2011 at 1:19 AM, Eli Friedman <[email protected]> wrote: > On Mon, Jun 13, 2011 at 10:08 PM, David Majnemer > <[email protected]> wrote: >> On Mon, Jun 13, 2011 at 5:04 PM, David Majnemer >> <[email protected]> wrote: >>> On Mon, Jun 13, 2011 at 4:16 AM, David Majnemer >>> <[email protected]> wrote: >>>> Hi, >>>> >>>> Right now, the code base is correct in saying that many types, like >>>> void, are non-POD when passed in to va_arg. >>>> >>>> While it is true that "struct X" is not a POD type, we do not say why >>>> it is not a POD type. >>>> I think that it would be more clear to say that the type is >>>> incomplete, this had a side effect of making a bit more sense in C99 >>>> mode where non-POD is not really part of the lingo. >>>> >>>> The attached patch should make it a little more clear. It also moves a >>>> preexisting test to a more appropriate location. >>>> >>>> -- >>>> David Majnemer >>>> >>> >>> After talking some folks in #llvm and thinking about it a bit, I have >>> decided to implement the following: >>> >>> The type must be complete per RequireCompleteType, otherwise issue an >>> error diagnostic >>> The type must be non-abstract per RequireNonAbstractType, otherwise >>> issue an error diagnostic >>> The type must be a POD per isPODType, otherwise issue a warning >>> diagnostic (-Wnon-pod-varargs) >>> >>> I have attached the new patch >>> >>> -- >>> David Majnemer >>> >> >> A small update to the patch: don't return ExprError when the Diag is >> just a warning and keep the formatting within 80 columns. >> >> I had someone look it over in #llvm, awaiting the OK over here. > > Looks fine. > > -Eli >
Thanks, committed in r132979. -- David Majnemer _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
