Re: r284265 - [Sema] Refactor context checking for availability diagnostics

2016-10-18 Thread Bob Wilson via cfe-commits
Yes. I filed rdar://problem/28812809 to report that problem in the SDK. I also filed rdar://problem/28825862 to remind us to restore the more strict checking after we release a version of the tvOS SDK with a fix. Thanks, Erik! > On Oct 18, 2016, at 9:46 AM, Erik Pilkington > wrote: > > >

Re: r284265 - [Sema] Refactor context checking for availability diagnostics

2016-10-18 Thread Erik Pilkington via cfe-commits
On second thought, I think the header *is* ill-formed here. If we allowed this behaviour, this would provide a way to circumvent an availability diagnostic. For example, now the following compiles cleanly, where we really should emit a diagnostic somewhere! typedef int unavail_int __attribute_

Re: r284265 - [Sema] Refactor context checking for availability diagnostics

2016-10-18 Thread Erik Pilkington via cfe-commits
Hi Bob, I think the code in the header is fine here, so I reverted in r284486. Here’s a reduced version: typedef int unavail_int __attribute__((availability(tvos, unavailable))); __attribute__((availability(tvos, unavailable))) @interface A extern unavail_int foo; @end The problem is that ‘foo’

Re: r284265 - [Sema] Refactor context checking for availability diagnostics

2016-10-17 Thread Bob Wilson via cfe-commits
Hi Erik, This change does not work with one of the headers from the AVFoundation framework in tvOS 10.0. We can try to get a fix into the tvOS SDK, but it will probably be a while before we could release an SDK with that change. In the meantime, this is kind of disruptive. Can you find a way to