Commit Graph

3 Commits

Author SHA1 Message Date
Slava Pestov
bfcf24ee4e AST: Rework @objcMembers inheritance to not depend on validation order
Sema would directly check for the presence of the @objcMembers attribute,
and inherit it from the immediate superclass in validateDecl().

We don't want validateDecl() to have side effects like this and this was
already a problem, because it would not inherit the attribute transitively
in some cases.

Instead, add a ClassDecl::hasObjCMembers() method that walks over all
ancestors and caches the result.

<rdar://problem/46420252>
2018-12-12 15:12:38 -05:00
Doug Gregor
e1a470008e [SE-0160] Allow @nonobjc on extensions of classes. 2017-04-03 00:23:13 -07:00
Doug Gregor
bbe3e92da3 [SE-0160] Add @objcMembers attribute and infer it on XCTestCase. 2017-03-31 21:54:03 -07:00