[cfe-dev] Small change to ObjC builtin type definition

David Chisnall csdavec at swansea.ac.uk
Mon Sep 8 17:23:14 PDT 2008


On 8 Sep 2008, at 18:30, Daniel Dunbar wrote:

> This causes several failure in the test suite
> (Parser/objc-forcollection-*) if I apply. Can
> you investigate?

I see.  The problem was that now the new id type is being used, but  
ASTContext doesn't recognise it as the ObjC type.  I've tweaked it to  
set it in ASTContext and removed the assert()s here that check it  
isn't already set.  Note that this will now leak, but I'm not sure  
what the best way of fixing this is (can we safely delete the old  
version?  Should we lazily create them somewhere if they're referenced  
before first use (and if so where)?).

The attached version passes all of the tests that it was passing  
before the patch.

David

P.S. I also see a failure in typedef-redef.c, which I didn't cause:
Errors seen but not expected:
   Line 5: typedef redefinition with different types ('unsigned long'  
vs '__size_t')
   Line 55: previous definition is here

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.diff
Type: application/octet-stream
Size: 2345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080909/6892975a/attachment.obj>


More information about the cfe-dev mailing list