This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C++: underline parameters in mismatching function calls
- From: Jason Merrill <jason at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: Nathan Sidwell <nathan at acm dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Sep 2017 12:24:14 -0400
- Subject: Re: [PATCH] C++: underline parameters in mismatching function calls
- Authentication-results: sourceware.org; auth=none
- References: <1505937163-17342-1-git-send-email-dmalcolm@redhat.com>
On Wed, Sep 20, 2017 at 3:52 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> + /* If we have a method, then DECL_ARGUMENTS begins with "this";
> + increment ARGNUM to skip it. */
> + if (TREE_CODE (TREE_TYPE (fndecl)) == METHOD_TYPE)
> + argnum++;
> +
> + /* Locate param by index within DECL_ARGUMENTS (fndecl). */
> + for (i = 0, param = DECL_ARGUMENTS (fndecl);
One more nit: You can use
param = FUNCTION_FIRST_USER_PARM (fndecl)
instead of messing with argnum.
Jason