[Bug c++/108012] Add fix-it hint for smartptr.foo which should be smartptr->foo
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 7 17:49:45 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108012
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=91138
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #0)
> For bonus points, check whether the result of smartptr->i would actually
> compile. Maybe the user meant to access a real member of the smart pointer
> type, like a Ptr::get() or Ptr::reset() member, in which case changing it ->
> would not make it any more correct.
Related to PR 91138, where we make an incorrect fix-it suggestion for the raw
pointer case.
More information about the Gcc-bugs
mailing list