History log of /external/clang/test/Sema/attr-availability-ios.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Sema/attr-availability-ios.c
d6724367519b4f98dcce091854549282c11d70a0 23-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> with -Wdeprecated, include a note to its deprecated declaration
location. // rdar://10893232


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability-ios.c
48b68a0dc345b3208cbd9dda719b9b3ec167c8c2 01-Feb-2012 Bob Wilson <bob.wilson@apple.com> Use the new Triple::getMacOSXVersion function in another place.

I removed support for "*-darwin*-iphoneos" triples, since we now have
iOS listed as a separate OS in the triples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability-ios.c
6cc425e21330a5fa456077def0fc727b92e6ecde 26-Mar-2011 Douglas Gregor <dgregor@apple.com> Test attribute merging for the availability attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability-ios.c
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability-ios.c