re PR c++/45329 (When printing a list of candidate functions, explain why each…
re PR c++/45329 (When printing a list of candidate functions, explain why each function failed to match.) gcc/cp/ PR c++/45329 * call.c (struct conversion): Document bad_p field. (enum rejection_reason_code): Define. (struct conversion_info): Define. (struct rejection_reason): Define. (struct z_candidate): Add `reason' field. (add_candidate): Add `reason' parameter. Store it in CAND. (alloc_rejection, arity_rejection, arg_conversion_rejection): New functions. (bad_arg_conversion_rejection): New function. (convert_class_to_reference): Add comment. (remaining_arguments): New function. (add_function_candidate): Record rejection reason and pass it to add_candidate. (add_conv_candidate, build_builtin_candidate): Likewise. (add_template_candidate_real): Likewise. (print_conversion_rejection): New function. (print_z_candidate): Print CAND->REASON if it exists. Adjust diagnostic strings. (print_z_candidates): Add location_t argument. Adjust calling sequence for print_z_candidate. Print header line directly. (build_user_type_conversion_1): Add reason for rejection to CAND. Adjust call to print_z_candidates. (print_error_for_call_failure): New function. (build_new_function_call): Call it. Adjust call to print_z_candidates. (build_operator_new_call): Likewise. (build_op_call): Likewise. (build_conditional_expr): Likewise. (build_new_op): Likewise. (build_new_method_call): Likewise. gcc/testsuite/ PR c++/45329 * testsuite/g++.dg/conversion/ambig1.C: Adjust. * testsuite/g++.dg/conversion/op1.C: Adjust. * testsuite/g++.dg/conversion/simd1.C: Adjust. * testsuite/g++.dg/cpp0x/defaulted14.C: Adjust. * testsuite/g++.dg/cpp0x/defaulted18.C: Adjust. * testsuite/g++.dg/cpp0x/defaulted20.C: Adjust. * testsuite/g++.dg/cpp0x/explicit3.C: Adjust. * testsuite/g++.dg/cpp0x/explicit4.C: Adjust. * testsuite/g++.dg/cpp0x/implicit4.C: Adjust. * testsuite/g++.dg/cpp0x/nullptr15.C: Adjust. * testsuite/g++.dg/cpp0x/nullptr19.C: Adjust. * testsuite/g++.dg/cpp0x/pr31431-2.C: Adjust. * testsuite/g++.dg/cpp0x/pr31431.C: Adjust. * testsuite/g++.dg/cpp0x/pr31434.C: Adjust. * testsuite/g++.dg/cpp0x/pr31437.C: Adjust. * testsuite/g++.dg/cpp0x/rv2n.C: Adjust. * testsuite/g++.dg/cpp0x/rv3n.C: Adjust. * testsuite/g++.dg/cpp0x/rv4n.C: Adjust. * testsuite/g++.dg/cpp0x/rv5n.C: Adjust. * testsuite/g++.dg/cpp0x/rv6n.C: Adjust. * testsuite/g++.dg/cpp0x/rv7n.C: Adjust. * testsuite/g++.dg/cpp0x/temp_default2.C: Adjust. * testsuite/g++.dg/cpp0x/trailing4.C: Adjust. * testsuite/g++.dg/cpp0x/variadic-ex3.C: Adjust. * testsuite/g++.dg/cpp0x/variadic-ex4.C: Adjust. * testsuite/g++.dg/cpp0x/variadic35.C: Adjust. * testsuite/g++.dg/cpp0x/vt-35147.C: Adjust. * testsuite/g++.dg/cpp0x/vt-37737-2.C: Adjust. * testsuite/g++.dg/expr/cond9.C: Adjust. * testsuite/g++.dg/expr/pmf-1.C: Adjust. * testsuite/g++.dg/ext/label5.C: Adjust. * testsuite/g++.dg/ext/visibility/anon8.C: Adjust. * testsuite/g++.dg/ext/vla2.C: Adjust. * testsuite/g++.dg/gomp/pr26690-1.C: Adjust. * testsuite/g++.dg/gomp/pr26690-2.C: Adjust. * testsuite/g++.dg/init/synth2.C: Adjust. * testsuite/g++.dg/lookup/conv-1.C: Adjust. * testsuite/g++.dg/lookup/new1.C: Adjust. * testsuite/g++.dg/lookup/using9.C: Adjust. * testsuite/g++.dg/other/error13.C: Adjust. * testsuite/g++.dg/other/error20.C: Adjust. * testsuite/g++.dg/other/error31.C: Adjust. * testsuite/g++.dg/other/pr28114.C: Adjust. * testsuite/g++.dg/other/ptrmem10.C: Adjust. * testsuite/g++.dg/other/ptrmem11.C: Adjust. * testsuite/g++.dg/overload/ambig1.C: Adjust. * testsuite/g++.dg/overload/arg3.C: Adjust. * testsuite/g++.dg/overload/builtin1.C: Adjust. * testsuite/g++.dg/overload/copy1.C: Adjust. * testsuite/g++.dg/overload/new1.C: Adjust. * testsuite/g++.dg/overload/template4.C: Adjust. * testsuite/g++.dg/overload/unknown1.C: Adjust. * testsuite/g++.dg/overload/using2.C: Adjust. * testsuite/g++.dg/parse/crash5.C: Adjust. * testsuite/g++.dg/parse/error19.C: Adjust. * testsuite/g++.dg/parse/error28.C: Adjust. * testsuite/g++.dg/parse/template7.C: Adjust. * testsuite/g++.dg/parse/typename7.C: Adjust. * testsuite/g++.dg/rtti/typeid6.C: Adjust. * testsuite/g++.dg/tc1/dr152.C: Adjust. * testsuite/g++.dg/template/conv11.C: Adjust. * testsuite/g++.dg/template/copy1.C: Adjust. * testsuite/g++.dg/template/crash37.C: Adjust. * testsuite/g++.dg/template/deduce3.C: Adjust. * testsuite/g++.dg/template/dependent-expr5.C: Adjust. * testsuite/g++.dg/template/error38.C: Adjust. * testsuite/g++.dg/template/error40.C: Adjust. * testsuite/g++.dg/template/friend.C: Adjust. * testsuite/g++.dg/template/incomplete2.C: Adjust. * testsuite/g++.dg/template/instantiate5.C: Adjust. * testsuite/g++.dg/template/local4.C: Adjust. * testsuite/g++.dg/template/local6.C: Adjust. * testsuite/g++.dg/template/new3.C: Adjust. * testsuite/g++.dg/template/operator9.C: Adjust. * testsuite/g++.dg/template/overload6.C: Adjust. * testsuite/g++.dg/template/ptrmem2.C: Adjust. * testsuite/g++.dg/template/ptrmem20.C: Adjust. * testsuite/g++.dg/template/ptrmem4.C: Adjust. * testsuite/g++.dg/template/ptrmem8.C: Adjust. * testsuite/g++.dg/template/qualttp5.C: Adjust. * testsuite/g++.dg/template/sfinae2.C: Adjust. * testsuite/g++.dg/template/spec22.C: Adjust. * testsuite/g++.dg/template/spec23.C: Adjust. * testsuite/g++.dg/template/ttp25.C: Adjust. * testsuite/g++.dg/template/typedef4.C: Adjust. * testsuite/g++.dg/template/unify10.C: Adjust. * testsuite/g++.dg/template/unify11.C: Adjust. * testsuite/g++.dg/template/unify6.C: Adjust. * testsuite/g++.dg/template/unify7.C: Adjust. * testsuite/g++.dg/template/unify9.C: Adjust. * testsuite/g++.dg/template/varmod1.C: Adjust. * testsuite/g++.old-deja/g++.benjamin/15799.C: Adjust. * testsuite/g++.old-deja/g++.benjamin/15800-1.C: Adjust. * testsuite/g++.old-deja/g++.brendan/ambiguity1.C: Adjust. * testsuite/g++.old-deja/g++.brendan/crash29.C: Adjust. * testsuite/g++.old-deja/g++.brendan/crash48.C: Adjust. * testsuite/g++.old-deja/g++.brendan/crash56.C: Adjust. * testsuite/g++.old-deja/g++.brendan/cvt3.C: Adjust. * testsuite/g++.old-deja/g++.brendan/overload1.C: Adjust. * testsuite/g++.old-deja/g++.brendan/overload4.C: Adjust. * testsuite/g++.old-deja/g++.brendan/overload9.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900127_01.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900205_04.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900330_02.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900404_03.C: Adjust. * testsuite/g++.old-deja/g++.bugs/900514_03.C: Adjust. * testsuite/g++.old-deja/g++.eh/ctor1.C: Adjust. * testsuite/g++.old-deja/g++.jason/conversion11.C: Adjust. * testsuite/g++.old-deja/g++.jason/crash3.C: Adjust. * testsuite/g++.old-deja/g++.jason/overload16.C: Adjust. * testsuite/g++.old-deja/g++.jason/overload28.C: Adjust. * testsuite/g++.old-deja/g++.jason/scoping10.C: Adjust. * testsuite/g++.old-deja/g++.jason/template30.C: Adjust. * testsuite/g++.old-deja/g++.jason/temporary2.C: Adjust. * testsuite/g++.old-deja/g++.law/arg1.C: Adjust. * testsuite/g++.old-deja/g++.law/arg11.C: Adjust. * testsuite/g++.old-deja/g++.law/arm9.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors11.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors17.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors5.C: Adjust. * testsuite/g++.old-deja/g++.law/ctors9.C: Adjust. * testsuite/g++.old-deja/g++.law/enum4.C: Adjust. * testsuite/g++.old-deja/g++.law/missed-error2.C: Adjust. * testsuite/g++.old-deja/g++.law/operators32.C: Adjust. * testsuite/g++.old-deja/g++.law/operators9.C: Adjust. * testsuite/g++.old-deja/g++.mike/net2.C: Adjust. * testsuite/g++.old-deja/g++.mike/net22.C: Adjust. * testsuite/g++.old-deja/g++.mike/p11110.C: Adjust. * testsuite/g++.old-deja/g++.mike/p1989.C: Adjust. * testsuite/g++.old-deja/g++.mike/p2431.C: Adjust. * testsuite/g++.old-deja/g++.mike/p438.C: Adjust. * testsuite/g++.old-deja/g++.mike/p807a.C: Adjust. * testsuite/g++.old-deja/g++.mike/p9068.C: Adjust. * testsuite/g++.old-deja/g++.niklas/t120.C: Adjust. * testsuite/g++.old-deja/g++.niklas/t121.C: Adjust. * testsuite/g++.old-deja/g++.niklas/t128.C: Adjust. * testsuite/g++.old-deja/g++.ns/overload2.C: Adjust. * testsuite/g++.old-deja/g++.ns/using12.C: Adjust. * testsuite/g++.old-deja/g++.other/crash24.C: Adjust. * testsuite/g++.old-deja/g++.other/expr1.C: Adjust. * testsuite/g++.old-deja/g++.other/overload11.C: Adjust. * testsuite/g++.old-deja/g++.other/pmf3.C: Adjust. * testsuite/g++.old-deja/g++.other/volatile1.C: Adjust. * testsuite/g++.old-deja/g++.pt/auto_ptr.C: Adjust. * testsuite/g++.old-deja/g++.pt/crash28.C: Adjust. * testsuite/g++.old-deja/g++.pt/crash60.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit38.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit39.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit41.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit67.C: Adjust. * testsuite/g++.old-deja/g++.pt/explicit77.C: Adjust. * testsuite/g++.old-deja/g++.pt/expr2.C: Adjust. * testsuite/g++.old-deja/g++.pt/ptrmem10.C: Adjust. * testsuite/g++.old-deja/g++.pt/ptrmem6.C: Adjust. * testsuite/g++.old-deja/g++.pt/spec35.C: Adjust. * testsuite/g++.old-deja/g++.pt/spec5.C: Adjust. * testsuite/g++.old-deja/g++.pt/spec6.C: Adjust. * testsuite/g++.old-deja/g++.pt/t05.C: Adjust. * testsuite/g++.old-deja/g++.pt/t24.C: Adjust. * testsuite/g++.old-deja/g++.pt/unify4.C: Adjust. * testsuite/g++.old-deja/g++.pt/unify6.C: Adjust. * testsuite/g++.old-deja/g++.pt/unify8.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb109.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb119.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb131.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb22.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb69.C: Adjust. * testsuite/g++.old-deja/g++.robertl/eb98.C: Adjust. From-SVN: r167607
Showing
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment