Objective-C super parsing

This diff fixes parsing of super in Objective-C programs to use a built-in decl. I get no test failures as a result of it, however I am getting one test failure for a different reason. Analysis/complex.c fails on FreeBSD because intptr_t is not declared. This comes from stdint, which is not included by stdlib. Adding this diff fixes it, but I don't know if it breaks it on other platforms:

David

Index: test/Analysis/complex.c

super.diff (1.95 KB)

Hi David,

I fixed the test case to use stdint.h.

I'm a little confused. I'm looking back over the emails (subject: Objective-C tidy up) and I thought the decision was to not use PredefinedExpr for super/self/etc. I could have easily missed an email (I have a backlog from pre-WWDC). Could you please clarify (or be so kind to point me to the email I missed on the list archives, since you probably remember the exact email exchange).

Best,
Ted

This diff fixes parsing of super in Objective-C programs to use a
built-in decl. I get no test failures as a result of it, however I
am getting one test failure for a different reason. Analysis/
complex.c fails on FreeBSD because intptr_t is not declared. This
comes from stdint, which is not included by stdlib. Adding this
diff fixes it, but I don't know if it breaks it on other platforms:

Hi David,

I fixed the test case to use stdint.h.

I committed a tweaked version of the rest of the patch here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080616/006202.html

I'm a little confused. I'm looking back over the emails (subject:
Objective-C tidy up) and I thought the decision was to not use
PredefinedExpr for super/self/etc. I could have easily missed an
email (I have a backlog from pre-WWDC). Could you please clarify (or
be so kind to point me to the email I missed on the list archives,
since you probably remember the exact email exchange).

Yep, you're right Ted. Those enums were dead, so I zapped them.
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080616/006203.html

-Chris

Hi Ted,

I fixed the test case to use stdint.h.

Thanks.

I'm a little confused. I'm looking back over the emails (subject: Objective-C tidy up) and I thought the decision was to not use PredefinedExpr for super/self/etc. I could have easily missed an email (I have a backlog from pre-WWDC). Could you please clarify (or be so kind to point me to the email I missed on the list archives, since you probably remember the exact email exchange).

The decision was not to use a PredefinedExpr for self and _cmd, since these are just DeclRefs which reference an implicit decl. The situation is different for super, however, since it is has different semantics (it is only valid as the receiver in message expressions).

David

Cool. Thanks for the clarification!