[cfe-commits] [Patch][Review Request]Fix for PR7287

Douglas Gregor dgregor at apple.com
Mon Nov 1 14:52:29 PDT 2010


On Nov 1, 2010, at 2:45 PM, Jim Goodnow II wrote:

> At 02:06 PM 11/1/2010, Douglas Gregor wrote:
> 
>> On Nov 1, 2010, at 1:59 PM, Jim Goodnow II wrote:
>> 
>> > Hi,
>> >
>> > Please review and commit this patch for PR7287. Thanks.
>> 
>> This isn't quite the right fix, because it won't handle, e.g., direct calls to an operator
>> 
>>        operator+(x, y)
>> 
>> 
>> Instead, we should probably use FD->getIdentifier() and bail out early if it returns NULL.
>> 
>>        - Doug
> 
> Well, those calls would actually be MemberCallExpr's, so it wouldn't occur in VisitCallExpr.

No, it could be a CallExpr:

	struct A { };
	A operator+(A, A);
	void f(A x, A y) { operator+(x, y); }

> The problem is really just an artifact of CXXOperatorCalls being grouped together with Calls. Eventually, they will probably be separated and this check can go away.


They're all calls; the subclasses are used to describe the different syntax used in the language to form such a call.

	- Doug



More information about the cfe-commits mailing list