Aaron Ballman
adf66b6174
Determine the attribute subject for diagnostics based on declarative information in DeclNodes.td. This greatly reduces the number of enumerated values used for more complex diagnostics; these are now only required when the "attribute only applies to" diagnostic needs to be generated manually as part of semantic processing.
...
This also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc).
Many of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute).
llvm-svn: 319002
2017-11-26 20:01:12 +00:00
Fariborz Jahanian
27aa9b4028
[Objective-C Sema] Fixes a typo which did not allow
...
bridge casting to super class of object's bridge type.
rdar://18311183
llvm-svn: 234652
2015-04-10 22:07:47 +00:00
John McCall
2859258e2f
Allow objc_bridge(id) to be used on typedefs of [cv] void*.
...
rdar://19678874
llvm-svn: 227774
2015-02-01 22:34:06 +00:00
Fariborz Jahanian
f1a22f487e
Objective-C. Improve diagnosis of bridging types.
...
// rdar://16737117
llvm-svn: 207542
2014-04-29 16:12:56 +00:00
Fariborz Jahanian
48a01cb5ec
Objective-C arc [Sema]. Allow bridge cast of a qualified-id expression
...
when bridged Objective-C type conforms to the protocols in CF types's
Objective-C class. // rdar://16393330
llvm-svn: 205659
2014-04-04 23:53:45 +00:00
Fariborz Jahanian
2651ac5445
ObjectiveC migrator. Improve on definition, use
...
and testing of objc_bridgmutable attribute per
Aaron Ballman's comments.
// rdar://15498044
llvm-svn: 195396
2013-11-22 00:02:22 +00:00
Fariborz Jahanian
8c5b4be417
ObjectiveC. Allow toll free bridge cast warnings outside
...
ARC and in objectiveC/ObjectiveC++ MRR mode as well.
// rdar://15454846
llvm-svn: 195288
2013-11-21 00:39:36 +00:00
Fariborz Jahanian
1f92b7f7c4
ObjectiveC ARC. warn in presense of __bridge casting to
...
or from a toll free bridge cast. // rdar://15454846
llvm-svn: 195278
2013-11-20 22:55:41 +00:00
Fariborz Jahanian
91fb0be96a
ObjectiveC ARC. Better checking of toll free briding
...
from qualified-id objects to CF types with
objc_bridge annotation. // rdar://15454846
llvm-svn: 195264
2013-11-20 19:01:50 +00:00
Fariborz Jahanian
92ab2985da
ObjectiveC ARC. validate toll free bridge casting
...
to or from 'id' and qualified-id types.
// rdar://15454846
llvm-svn: 195178
2013-11-20 00:32:12 +00:00
Fariborz Jahanian
f720f86774
bjectiveC. Use a uniform diagnostic for
...
'objc_bridge' attribute. // rdar://15454846.
llvm-svn: 195135
2013-11-19 17:42:25 +00:00
Fariborz Jahanian
509f31efd0
ObjectiveC 'objc_bridging'. Assorment of improvements
...
per Doug/Jordan comments. // rdar://15454846.
llvm-svn: 195066
2013-11-19 01:23:07 +00:00
Fariborz Jahanian
db3d8554be
ObjectiveC ARC. Adopt objc_bridge attribute
...
on struct/union/class instead of typedef of
such types. // rdar://15454846
llvm-svn: 195061
2013-11-19 00:09:48 +00:00
Fariborz Jahanian
2c31212827
ObjectiveC ARC. More validation of toll-free bridging of
...
CF objects with objc_bridge'ing annotaiton.
// rdar://15454846
llvm-svn: 194938
2013-11-16 23:22:37 +00:00
Fariborz Jahanian
8a0210e535
ObjectiveC ARC. Validate toll free bridge casting
...
of ObjectiveC objects to CF types when CF type
has the objc_bridge attribute.
llvm-svn: 194930
2013-11-16 19:16:32 +00:00
Fariborz Jahanian
f07183ce94
ObjetiveC ARC. Start diagnosing invalid toll free bridging.
...
// rdar://15454846.
llvm-svn: 194915
2013-11-16 01:45:25 +00:00
Fariborz Jahanian
b8233193a4
ObjectiveC ARC. Only briding of pointer to struct CF object is allowed.
...
Improve on wording on illegal objc_bridge argumment.
// rdar://15454846
llvm-svn: 194881
2013-11-15 23:14:45 +00:00
Fariborz Jahanian
e79cef6ae1
ObjectiveC ARG. A positive test of my previous patch.
...
// rdar://15454846
llvm-svn: 194864
2013-11-15 22:33:12 +00:00
Fariborz Jahanian
a649c82d69
ObjectiveC ARC. Lookup type associated with objc_bridage at
...
the point of CF object type-cast and issue diagnostic
if it is not a valid ObjectiveC class. // rdar//15454846.
This is wip.
llvm-svn: 194861
2013-11-15 22:18:17 +00:00
Fariborz Jahanian
a0f0395b9f
Use a more realistic NS class names in
...
objc_bridge attributes in my previous test.
Per Jordan's comment.
llvm-svn: 194645
2013-11-14 01:00:26 +00:00
Fariborz Jahanian
ae02d1552f
ObjectiveC ARC. objc_bridge attribute should be applied to
...
toll-free bridging cf types only. // rdar//15454846 wip.
llvm-svn: 194640
2013-11-14 00:43:05 +00:00
Fariborz Jahanian
0a0a39708c
ObjectiveC ARC. Introduce a new attribute, 'objc_bridge'
...
that teaches the compiler about a subset of toll-free
bridging semantics. This is wip. // rdar://15454846
llvm-svn: 194633
2013-11-13 23:59:17 +00:00