Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Remove "prefix" argument from cp_type_print_method_args
@ 2026-04-18  2:10 Tom Tromey
  2026-04-18  2:32 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2026-04-18  2:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

The "prefix" argument to cp_type_print_method_args is only ever the
empty string, so it can be removed.
---
 gdb/c-typeprint.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 821b78becf4..e418aca56a4 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -244,7 +244,7 @@ cp_type_print_derivation_info (struct ui_file *stream,
 /* Print the C++ method arguments ARGS to the file STREAM.  */
 
 static void
-cp_type_print_method_args (struct type *mtype, const char *prefix,
+cp_type_print_method_args (struct type *mtype,
 			   const char *varstring, int staticp,
 			   struct ui_file *stream,
 			   enum language language,
@@ -255,8 +255,6 @@ cp_type_print_method_args (struct type *mtype, const char *prefix,
   int varargs = mtype->has_varargs ();
   int i;
 
-  fprintf_symbol (stream, prefix,
-		  language_cplus, DMGL_ANSI);
   fprintf_symbol (stream, varstring,
 		  language_cplus, DMGL_ANSI);
   gdb_puts ("(", stream);
@@ -1164,7 +1162,6 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream,
 		  struct type *mtype = TYPE_FN_FIELD_TYPE (f, j);
 
 		  cp_type_print_method_args (mtype,
-					     "",
 					     method_name,
 					     staticp,
 					     stream, language,
-- 
2.49.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove "prefix" argument from cp_type_print_method_args
  2026-04-18  2:10 [PATCH] Remove "prefix" argument from cp_type_print_method_args Tom Tromey
@ 2026-04-18  2:32 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2026-04-18  2:32 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches



On 2026-04-17 22:10, Tom Tromey wrote:
> The "prefix" argument to cp_type_print_method_args is only ever the
> empty string, so it can be removed.
> ---
>  gdb/c-typeprint.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
> index 821b78becf4..e418aca56a4 100644
> --- a/gdb/c-typeprint.c
> +++ b/gdb/c-typeprint.c
> @@ -244,7 +244,7 @@ cp_type_print_derivation_info (struct ui_file *stream,
>  /* Print the C++ method arguments ARGS to the file STREAM.  */
>  
>  static void
> -cp_type_print_method_args (struct type *mtype, const char *prefix,
> +cp_type_print_method_args (struct type *mtype,
>  			   const char *varstring, int staticp,
>  			   struct ui_file *stream,
>  			   enum language language,
> @@ -255,8 +255,6 @@ cp_type_print_method_args (struct type *mtype, const char *prefix,
>    int varargs = mtype->has_varargs ();
>    int i;
>  
> -  fprintf_symbol (stream, prefix,
> -		  language_cplus, DMGL_ANSI);
>    fprintf_symbol (stream, varstring,
>  		  language_cplus, DMGL_ANSI);
>    gdb_puts ("(", stream);
> @@ -1164,7 +1162,6 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream,
>  		  struct type *mtype = TYPE_FN_FIELD_TYPE (f, j);
>  
>  		  cp_type_print_method_args (mtype,
> -					     "",
>  					     method_name,
>  					     staticp,
>  					     stream, language,

Seems obvious.

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-18  2:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-18  2:10 [PATCH] Remove "prefix" argument from cp_type_print_method_args Tom Tromey
2026-04-18  2:32 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox