Knowing if a default argument was inherited.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Knowing if a default argument was inherited.

Enea Zaffanella
Hello.

The attached patch adds a Boolean flag (named HasInheritedDefaultArg) to
ParmVarDecl nodes. The flag (normally false) allows to distinguish those
parameters having a written default argument from those inheriting such
a default argument (when merging the current function declaration with a
a previous one).

Cheers,
Enea Zaffanella.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

InheritedDefaultArg.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Knowing if a default argument was inherited.

John McCall

On Mar 12, 2010, at 8:39 AM, Enea Zaffanella wrote:

> Hello.
>
> The attached patch adds a Boolean flag (named HasInheritedDefaultArg) to ParmVarDecl nodes. The flag (normally false) allows to distinguish those parameters having a written default argument from those inheriting such a default argument (when merging the current function declaration with a a previous one).

Looks good;  committed as r98362.

John.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev