]> gcc.gnu.org Git - gcc.git/commit
C++: underline parameters in mismatching function calls
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Sep 2017 14:49:52 +0000 (14:49 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Sep 2017 14:49:52 +0000 (14:49 +0000)
commit5d78d423a5f7a1d135c7bb678e82007678d1313c
treecac019ce232d5ffc46759f8e504ae17c9a014285
parent7b3574e4981235f2f04ec12f55d1cae7bc5518f5
C++: underline parameters in mismatching function calls

gcc/cp/ChangeLog:
* call.c (get_fndecl_argument_location): New function.
(convert_like_real): Use it  when complaining about argument type
mismatches.
* cp-tree.h (struct cp_parameter_declarator): Add "loc" field.
* parser.c (make_parameter_declarator): Add "loc" param and use
it to initialize the new field.
(cp_parser_translation_unit): Add UNKNOWN_LOCATION for "loc" of
the "no_parameters" parameter.
(cp_parser_parameter_declaration_list): Set the location of the
result of grokdeclarator to be the parameter's loc, assuming no
errors.
(cp_parser_parameter_declaration): Generate a location for the
parameter and pass to make_parameter_declarator.

gcc/testsuite/ChangeLog:
* g++.dg/diagnostic/param-type-mismatch.C: Update expected results
to reflect highlighting of parameters; add test coverage for
callback parameters.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253096 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/param-type-mismatch.C
This page took 0.062253 seconds and 5 git commands to generate.