This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] C++: underline parameters in mismatching function calls


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]