[cfe-dev] [patch] Support explicit C++ member operator syntax

Eli Friedman eli.friedman at gmail.com
Sat Aug 29 21:24:26 PDT 2009


On Sat, Aug 29, 2009 at 8:37 PM, James Porter<porterj at alum.rit.edu> wrote:
> Attached is a patch to add support for explicitly referring to member
> operators in C++, e.g. x.operator++(). It supports both overloaded operators
> and conversion operators.
>
> The patch also contains a fix in the same area of the code to eliminate a
> crash when compiling syntactically-incorrect code as part of a
> member-reference (e.g. x.int).  That crash was actually my fault anyway,
> since it came about from adding support for qualified-ids in class member
> access. If you think the fix should be a separate patch, let me know and
> I'll pull them apart.
>
> There are also tests for both parts of the patch.

+        // TODO: support conversion operators too

Is that supposed to be there?

+        } else if(TypeTy *ConvType = ParseConversionFunctionId()) {

Space after if.

Otherwise, looks fine to me, but Doug should probably look at it as well.

-Eli




More information about the cfe-dev mailing list