[cfe-dev] Parameter check question

Douglas Gregor dgregor at apple.com
Mon Oct 5 14:58:52 PDT 2009


On Oct 5, 2009, at 2:37 PM, Tanya Lattner wrote:

> Hello,
>
> I want to do a check on function parameters similar to the  
> "err_arg_with_address_space" check that I added in  
> ActOnParamDeclarator (r83165). However, this time, I only want to  
> perform the check if the function has a specific attribute. Is  
> ActOnParamDeclarator the right place? I'm not seeing a way to get  
> the function attribute there. Or, any suggestion on where to add this?


ActOnParamDeclarator won't work, since that gets can get called by the  
parser before we've seen the function attributes. I suggest putting  
this check into ActOnFunctionDeclarator (e.g., where we check for  
parameters of "void" type).

	- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091005/205036d7/attachment.html>


More information about the cfe-dev mailing list