* [RFC] Possible cleanup - remove unused argument 'lax' to find_overload_match
@ 2013-01-25 13:45 Siva Chandra
2013-01-25 16:41 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Siva Chandra @ 2013-01-25 13:45 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 646 bytes --]
The 'lax' argument to find_overload_match is not used. I do not know
the history as to why this argument is present, but the attached patch
removes this argument.
Tested by building on x86_64 linux.
2013-01-25 Siva Chandra Reddy <sivachandra@google.com>
* valops.c (find_overload_match): Remove unused argument
'lax'.
* value.h: Remove unused argument 'lax' from the declaration
of
find_overload_match.
* eval.c (value_subexp_standard): Do not pass a 'lax' argument
to find_overload_match.
* valarith.c (value_user_defined_cpp_op): Do not pass a 'lax'
argument to find_overload_match.
[-- Attachment #2: remove_lax_patch_v1.txt --]
[-- Type: text/plain, Size: 4037 bytes --]
Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.176
diff -u -p -r1.176 eval.c
--- eval.c 1 Jan 2013 06:32:41 -0000 1.176
+++ eval.c 25 Jan 2013 13:31:28 -0000
@@ -1590,7 +1590,6 @@ evaluate_subexp_standard (struct type *e
find_overload_match (&argvec[1], nargs, func_name,
NON_METHOD, /* not method */
- 0, /* strict match */
NULL, NULL, /* pass NULL symbol since
symbol is unknown */
NULL, &symp, NULL, 0);
@@ -1626,7 +1625,6 @@ evaluate_subexp_standard (struct type *e
(void) find_overload_match (&argvec[1], nargs, tstr,
METHOD, /* method */
- 0, /* strict match */
&arg2, /* the object */
NULL, &valp, NULL,
&static_memfuncp, 0);
@@ -1698,7 +1696,6 @@ evaluate_subexp_standard (struct type *e
(void) find_overload_match (&argvec[1], nargs,
NULL, /* no need for name */
NON_METHOD, /* not method */
- 0, /* strict match */
NULL, function, /* the function */
NULL, &symp, NULL, no_adl);
Index: valarith.c
===================================================================
RCS file: /cvs/src/src/gdb/valarith.c,v
retrieving revision 1.107
diff -u -p -r1.107 valarith.c
--- valarith.c 1 Jan 2013 06:41:29 -0000 1.107
+++ valarith.c 25 Jan 2013 13:31:28 -0000
@@ -294,7 +294,7 @@ value_user_defined_cpp_op (struct value
struct value *valp = NULL;
find_overload_match (args, nargs, operator, BOTH /* could be method */,
- 0 /* strict match */, &args[0], /* objp */
+ &args[0] /* objp */,
NULL /* pass NULL symbol since symbol is unknown */,
&valp, &symp, static_memfuncp, 0);
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.308
diff -u -p -r1.308 valops.c
--- valops.c 1 Jan 2013 06:41:29 -0000 1.308
+++ valops.c 25 Jan 2013 13:31:28 -0000
@@ -2532,11 +2532,9 @@ value_find_oload_method_list (struct val
/* Given an array of arguments (ARGS) (which includes an
entry for "this" in the case of C++ methods), the number of
- arguments NARGS, the NAME of a function whether it's a method or
- not (METHOD), and the degree of laxness (LAX) in conforming to
- overload resolution rules in ANSI C++, find the best function that
- matches on the argument types according to the overload resolution
- rules.
+ arguments NARGS, the NAME of a function, and whether it's a method or
+ not (METHOD), find the best function that matches on the argument types
+ according to the overload resolution rules.
METHOD can be one of three values:
NON_METHOD for non-member functions.
@@ -2575,7 +2573,7 @@ value_find_oload_method_list (struct val
int
find_overload_match (struct value **args, int nargs,
const char *name, enum oload_search_type method,
- int lax, struct value **objp, struct symbol *fsym,
+ struct value **objp, struct symbol *fsym,
struct value **valp, struct symbol **symp,
int *staticp, const int no_adl)
{
Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.213
diff -u -p -r1.213 value.h
--- value.h 1 Jan 2013 06:41:29 -0000 1.213
+++ value.h 25 Jan 2013 13:31:28 -0000
@@ -645,7 +645,7 @@ enum oload_search_type { NON_METHOD, MET
extern int find_overload_match (struct value **args, int nargs,
const char *name,
- enum oload_search_type method, int lax,
+ enum oload_search_type method,
struct value **objp, struct symbol *fsym,
struct value **valp, struct symbol **symp,
int *staticp, const int no_adl);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Possible cleanup - remove unused argument 'lax' to find_overload_match
2013-01-25 13:45 [RFC] Possible cleanup - remove unused argument 'lax' to find_overload_match Siva Chandra
@ 2013-01-25 16:41 ` Tom Tromey
2013-01-25 22:34 ` Siva Chandra
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2013-01-25 16:41 UTC (permalink / raw)
To: Siva Chandra; +Cc: gdb-patches
>>>>> "Siva" == Siva Chandra <sivachandra@google.com> writes:
Siva> The 'lax' argument to find_overload_match is not used. I do not know
Siva> the history as to why this argument is present, but the attached patch
Siva> removes this argument.
It seems it was already that way in 6.8. I didn't dig any deeper than
that.
The patch is ok, thanks.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Possible cleanup - remove unused argument 'lax' to find_overload_match
2013-01-25 16:41 ` Tom Tromey
@ 2013-01-25 22:34 ` Siva Chandra
0 siblings, 0 replies; 3+ messages in thread
From: Siva Chandra @ 2013-01-25 22:34 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On Fri, Jan 25, 2013 at 8:40 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Siva" == Siva Chandra <sivachandra@google.com> writes:
>
> Siva> The 'lax' argument to find_overload_match is not used. I do not know
> Siva> the history as to why this argument is present, but the attached patch
> Siva> removes this argument.
>
> It seems it was already that way in 6.8. I didn't dig any deeper than
> that.
>
> The patch is ok, thanks.
Committed.
Thanks,
Siva Chandra
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-25 22:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25 13:45 [RFC] Possible cleanup - remove unused argument 'lax' to find_overload_match Siva Chandra
2013-01-25 16:41 ` Tom Tromey
2013-01-25 22:34 ` Siva Chandra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox