https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84892

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Wed Mar 21 13:09:09 2018
New Revision: 258716

URL: https://gcc.gnu.org/viewcvs?rev=258716&root=gcc&view=rev
Log:
C++: show private field accessor hints for const accesses (PR c++/84892)

gcc/cp/ChangeLog:
        PR c++/84892
        * search.c (field_accessor_p): Use class_of_this_parm rather than
        type_of_this_parm, to check that "this" is a "const T *", rather
        than a "T *const".

gcc/testsuite/ChangeLog:
        PR c++/84892
        * g++.dg/other/accessor-fixits-1.C
        (test_access_const_t1_color): New.
        (test_deref_const_t1_color): New.
        * g++.dg/other/accessor-fixits-5.C: New testcase.


Added:
    trunk/gcc/testsuite/g++.dg/other/accessor-fixits-5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/search.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/other/accessor-fixits-1.C

Reply via email to