On Tue, Jan 07, 2025 at 06:52:29PM -0500, David Malcolm wrote:
> On Tue, 2025-01-07 at 15:08 -0500, Marek Polacek wrote:
> > > @@ -4548,22 +4553,28 @@ error_args_num (location_t loc, tree
> > > fndecl, bool too_many_p)
> > >             == DECL_NAME (TYPE_NAME (DECL_CONTEXT
> > > (fndecl)))))
> > >       error_at (loc,
> > >                 too_many_p
> > > -               ? G_("too many arguments to constructor
> > > %q#D")
> > > -               : G_("too few arguments to constructor
> > > %q#D"),
> > > -               fndecl);
> > > +               ? G_("too many arguments to constructor
> > > %q#D; expected %i, have %i")
> > > +               : (at_least_p
> > > +                  ? G_("too few arguments to constructor
> > > %q#D; expected at least %i, have %i")
> > > +                  : G_("too few arguments to constructor
> > > %q#D; expected %i, have %i")),
> > > +               fndecl, expected_num, actual_num);
> > >     else
> > >       error_at (loc,
> > >                 too_many_p
> > > -               ? G_("too many arguments to member function
> > > %q#D")
> > > -               : G_("too few arguments to member function
> > > %q#D"),
> > > -               fndecl);
> > > +               ? G_("too many arguments to member function
> > > %q#D; expected %i, have %i")
> > > +               : (at_least_p
> > > +                  ? G_("too few arguments to member
> > > function %q#D; expected at least %i, have %i")
> > > +                  : G_("too few arguments to member
> > > function %q#D; expected %i, have %i")),
> > > +               fndecl, expected_num, actual_num);
> > >   }
> > 
> > Looks like the METHOD_TYPE block is not exercised in our testsuite
> > :(.
> 
> I'll take a look at adding test coverage for that, I guess.  I know
> next to nothing about Objective C++ though :(

It may be possible that it's dead code, and your change to the error
message is pretty obvious even if the code isn't dead, so please don't
worry about this too much.  I don't think you need to construct an ObjC++
test for this patch.  Thanks,

Marek

Reply via email to