Add fix-it hint for missing return statement in assignment operators (PR c++/85523)
gcc/cp/ChangeLog: PR c++/85523 * decl.c: Include "gcc-rich-location.h". (add_return_star_this_fixit): New function. (finish_function): When warning about missing return statements in functions returning non-void, add a "return *this;" fix-it hint for assignment operators. gcc/testsuite/ChangeLog: PR c++/85523 * g++.dg/pr85523.C: New test. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r263298
Showing
gcc/testsuite/g++.dg/pr85523.C
0 → 100644
Please
register
or
sign in
to comment