mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
Test and support all cpp operator types.
2010-06-07 Sami Wagiaalla <swagiaal@redhat.com> * value.h: Created oload_search_type enum. (find_overload_match): Use oload_search_type enum. * valops.c (find_overload_match): Support combined member and non-member search. * eval.c (evaluate_subexp_standard): Calls to find_overload_match now use oload_search_type enum. (oload_method_static): Verify index is a proper value. * valarith.c (value_user_defined_cpp_op): Search for and handle both member and non-member operators. (value_user_defined_cpp_op): New function. (value_user_defined_op): New function. (value_x_unop): Use value_user_defined_op. (value_x_binop): Ditto. * cp-support.c (make_symbol_overload_list_using): Added block iteration. Add check for namespace aliases and imported declarations. 2010-06-07 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/koenig.exp: Test for ADL operators. * gdb.cp/koenig.cc: Added ADL operators. * gdb.cp/operator.exp: New test. * gdb.cp/operator.cc: New test.
This commit is contained in:
@@ -1535,7 +1535,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
arg_types[ix - 1] = value_type (argvec[ix]);
|
||||
|
||||
find_overload_match (arg_types, nargs, func_name,
|
||||
0 /* not method */ , 0 /* strict match */ ,
|
||||
NON_METHOD /* not method */ , 0 /* strict match */ ,
|
||||
NULL, NULL /* pass NULL symbol since symbol is unknown */ ,
|
||||
NULL, &symp, NULL, 0);
|
||||
|
||||
@@ -1572,7 +1572,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
arg_types[ix - 1] = value_type (argvec[ix]);
|
||||
|
||||
(void) find_overload_match (arg_types, nargs, tstr,
|
||||
1 /* method */ , 0 /* strict match */ ,
|
||||
METHOD /* method */ , 0 /* strict match */ ,
|
||||
&arg2 /* the object */ , NULL,
|
||||
&valp, NULL, &static_memfuncp, 0);
|
||||
|
||||
@@ -1642,8 +1642,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
arg_types[ix - 1] = value_type (argvec[ix]);
|
||||
|
||||
(void) find_overload_match (arg_types, nargs, NULL /* no need for name */ ,
|
||||
0 /* not method */ , 0 /* strict match */ ,
|
||||
NULL, function /* the function */ ,
|
||||
NON_METHOD /* not method */ , 0 /* strict match */ ,
|
||||
NULL, function /* the function */ ,
|
||||
NULL, &symp, NULL, no_adl);
|
||||
|
||||
if (op == OP_VAR_VALUE)
|
||||
|
||||
Reference in New Issue
Block a user