[PATCH] Fix crash when assiging to a property with an invalid type

jahanian fjahanian at apple.com
Wed Jul 30 09:14:09 PDT 2014


I don’t see a crash with TOT clang:

t.m:3:3: error: unknown type name 'A'
  A* response; // expected-error {{unknown type name 'A'}}
  ^
t.m:8:11: error: unknown type name 'A'
@property A* response;  // expected-error {{unknown type name 'A'}}
          ^
t.m:13:16: error: expected a type
- (void) foo :(A*) a   // expected-error {{expected a type}}
               ^
t.m:15:17: error: assignment to readonly property
  self.response = a;
  ~~~~~~~~~~~~~ ^ ~
4 errors generated.

- Fariborz

On Jul 30, 2014, at 12:42 AM, Olivier Goffart <ogoffart at kde.org> wrote:

> Hi,
> 
> Attached you will find a fix for a crash I have when parsing objective C with 
> missing include.
> This is a regression against clang 3.4 which did not crash.
> 
> My approach here is naive and just fixes the symptoms (the crash).
> 
> Regards
> -- 
> Olivier<0001-Fix-crash-when-assiging-to-a-property-with-an-invali.patch>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140730/c2a753f8/attachment.html>


More information about the cfe-commits mailing list