[cfe-dev] C++ default arguments patch, rework Parse-Sema interaction for function parameters

Chris Lattner clattner at apple.com
Sat Apr 12 16:53:10 PDT 2008


On Apr 12, 2008, at 7:28 AM, Doug Gregor wrote:

> Hi Chris,
>
> On Wed, Apr 9, 2008 at 10:42 PM, Chris Lattner <clattner at apple.com>  
> wrote:
>> +++ lib/Sema/SemaDeclCXX.cpp    (working copy)
>>
>> +/// CheckDefaultArgumentVisitor - Traverses the default argument  
>> of a
>> +/// parameter to determine whether it contains any ill-formed
>> +/// subexpressions. For example, this will diagnose the use of local
>> +/// variables or parameters within the default argument expression.
>> +class VISIBILITY_HIDDEN CheckDefaultArgumentVisitor
>>
>> Please wrap this class in an anonymous namespace.  Is there a spec  
>> citation
>> that you can give for this?  Maybe C++ [dcl.fct.default] is enough.
>
> It checks semantics for a couple different paragraphs in
> [dcl.fct.default], so I've used that.

The patch looks great, applied:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080407/005157.html

Thanks Doug,

-Chris



More information about the cfe-dev mailing list