This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,c++] introduce {class,type}_of_this functions


On 05/06/2011 07:49 AM, Nathan Froyd wrote:
The patch below introduces simple accessors for getting at the class or
the type of the `this' parameter.  It hides a couple of TYPE_ARG_TYPES
usages and makes the code slightly more obvious, I think.

Hmm, when I first read the names I expected them to refer to the 'this' in the current function. I think adding _parm to the end of the names would help.


The type_ function should also have an assert that fntype is a METHOD_TYPE.

OK with those changes.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]