History log of /external/clang/test/Sema/attr-availability.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d130fd2e141f1fef412c2d58e7385370801bd718 08-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Clear LV cache when dropping availability attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
8c4222adbc0fd22928e751be6a75328fc9283a72 08-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't crash when trying to apply the availability attribute to a block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
d63b19ea855a66df8c58764604d48497c48829d9 08-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Clear the LV cache when merging the availability attribute.

The availability implies default visibility, so it can change the computed
visibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
faab5618b5beed350d7444de97cf513ef1a42ca6 01-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> availability in structured documents. Takes
care of comments by Dimitri and Doug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
b43f63822e051f2d28d8e083b688b2f113d6ba9c 24-Jul-2012 Jordan Rose <jordan_rose@apple.com> Add __has_feature(attribute_availability_with_message).

This tests for the ability to include a "message" field in availability
attributes, like so:

extern void ATSFontGetName(const char *oName)
__attribute__((availability(macosx,introduced=8.0,deprecated=9.0,
message="use CTFontCopyFullName")));

This was actually supported in Clang 3.1, but we got a request for a
__has_feature so that header files can use this more safely. It's
unfortunate that the 3.1 release doesn't include this, however.

<rdar://problem/11886458>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
9b79fc9c57dc9d541c2a5737c3e2c24cc68d485d 08-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Process attributes in the order they appear in the source code. This make clang
match gcc behavior for two conflicting visibilities in the same decl. It also
makes handling of dllimport/dllexport more natural.

As a bonus we now warn on the dllimport in

void __attribute__((dllimport)) foo13();
void __attribute__((dllexport)) foo13();

as does gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
3b294360febd89e3383143af086efe2014571afa 06-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Split mergeAvailabilityAttr out of handleAvailabilityAttr. This is important
for having a uniform logic for adding attributes to a decl. This in turn
is needed to fix the FIXME:

// FIXME: This needs to happen before we merge declarations. Then,
// let attribute merging cope with attribute conflicts.
ProcessDeclAttributes(S, NewFD, D,
/*NonInheritable=*/false, /*Inheritable=*/true);

The idea is that mergeAvailabilityAttr will become a method. Once attributes
are processed before merging, it will be called from handleAvailabilityAttr to
handle multiple attributes in one decl:

void f(int) __attribute__((availability(ios,deprecated=3.0),
availability(ios,introduced=2.0)));

and from SemaDecl.cpp to handle multiple decls:

void f(int) __attribute__((availability(ios,deprecated=3.0)));
void f(int) __attribute__((availability(ios,introduced=2.0)));

As a bonus, use the new structure to diagnose incompatible availability
attributes added to different decls (see included testcases).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.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.c
f96708d477e1a41a7c1c8087bcf1869045cf4f1c 24-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> fixes location of "availability" attribute so warning is displayed at
its line. // rdar://10711037


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
e7edf30143e565574c9bed0f1dbeaa47bb9a0891 10-Dec-2011 NAKAMURA Takumi <geek4civic@gmail.com> test/Sema/attr-availability.c: Add explicit -triple x86_64-apple-darwin9, for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
006e42f0c8b65b783d565ef10b938a9e82fc02e3 10-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> Add ability to supply additional message to availability macros,
// rdar://10095131


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.c
3b6b7accb55980b149571d44e96f92dae500b0a9 10-Aug-2011 Douglas Gregor <dgregor@apple.com> For the availability attribute, allow a declaration to be deprecated
in the same version that it is introduced. Stuff happens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-availability.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.c