From: Siva Chandra <sivachandra@google.com>
To: gdb-patches@sourceware.org
Subject: [RFC] Possible cleanup - remove unused argument 'lax' to find_overload_match
Date: Fri, 25 Jan 2013 13:45:00 -0000 [thread overview]
Message-ID: <CAGyQ6gwV2tpXPA+wKEw7a-0650u2HcFq=p=cAHQi_LApmVfOOw@mail.gmail.com> (raw)
[-- 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);
next reply other threads:[~2013-01-25 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 13:45 Siva Chandra [this message]
2013-01-25 16:41 ` Tom Tromey
2013-01-25 22:34 ` Siva Chandra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGyQ6gwV2tpXPA+wKEw7a-0650u2HcFq=p=cAHQi_LApmVfOOw@mail.gmail.com' \
--to=sivachandra@google.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox