[cfe-commits] r54013 - /cfe/trunk/lib/Parse/ParseObjc.cpp

Chris Lattner clattner at apple.com
Fri Jul 25 10:21:24 PDT 2008


On Jul 25, 2008, at 10:14 AM, Steve Naroff wrote:

>
> On Jul 25, 2008, at 12:46 PM, Chris Lattner wrote:
>
>>
>> On Jul 25, 2008, at 7:30 AM, Steve Naroff wrote:
>>
>>> Author: snaroff
>>> Date: Fri Jul 25 09:30:25 2008
>>> New Revision: 54013
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=54013&view=rev
>>> Log:
>>> Fix Parser::ParseObjCMethodDefinition(). Only call the actions  
>>> module for valid MDecl's.
>>
>> Steve, I don't think this is the right fix.  An actions  
>> implementation is currently allowed to return null pointers for the  
>> opaque decl object.  What are you fixing here?
>>
>
> The following...
>
> + (void)addObject {
> }
>
> ...would cause clang to crash.

Ok, that sounds like a sema bug.

> The action assumes a non-null MDecl.

The implementation of the action in sema does, but there can be  
multiple actions implementations.  "-parse-noop" almost certainly  
returns a null MDecl, and clients that extend it could still want  
calls to ObjCActOnStartOfMethodDef to be run.

-Chris




More information about the cfe-commits mailing list