On Jun 20, 2013, at 12:49 PM, Reid Kleckner <[email protected]> wrote:
> On Thu, Jun 20, 2013 at 1:37 PM, John McCall <[email protected]> wrote:
> Good point, sorry.
> 
> Hmm.  It looks like ActOnStartOfFunctionDef, ActOnStartOfObjCMethodDef, 
> ActOnBlockArguments, and addLambdaParameters all have basically the same loop 
> in them, but doing slightly different checks for no particular reason.  And 
> there's already a CheckParmsForFunctionDef method, but it's apparently not 
> called for ObjC methods.
> 
> I think it makes sense to have a single method called in all of these cases 
> which performs the basic checks, sets ownership, and pushes parameters into 
> scope.  That method would be a natural place for your call to 
> FinalizeVarWithDestructor.
> 
> I ended up putting it in CheckParmsForFunctionDef.  Probably ObjC methods 
> should be calling that?

I was hoping that you'd do the refactoring to make that happen. :)

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

Reply via email to