[cfe-commits] r58392 - in /cfe/trunk: lib/AST/Decl.cpp test/Sema/PR2923.c

Ted Kremenek kremenek at apple.com
Wed Oct 29 21:27:49 PDT 2008


On Oct 29, 2008, at 9:22 PM, Chris Lattner wrote:

> On Oct 29, 2008, at 11:41 AM, Ted Kremenek wrote:
>
>> Author: kremenek
>> Date: Wed Oct 29 13:41:34 2008
>> New Revision: 58392
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=58392&view=rev
>> Log:
>> Fix crash reported in PR2923 where a function declared using  
>> typeof(another_function) would have FunctionDecl::getNumParams()  
>> return the number of parameters in the original function type and  
>> not the number of parameters in the actual FunctionDecl.
>
> Cool, thanks for working on this Ted.  There was a very similar case  
> for C++.  I thought the fix there was to actually create the  
> parameter decls in cases like this, I think we should do everything  
> possible to keep C++ and C consistent here.
>
> -Chris


I wasn't aware of the similar fix for C++.

In my mind do we want to create fake ParmVarDecls here?  There aren't  
really any decls in the prototype of the function using "typeof".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081029/bd9bebe8/attachment.html>


More information about the cfe-commits mailing list