History log of /external/clang/test/Sema/attr-visibility.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d4c3d66be70ae2d0bd828329022dc428cc277a1c 20-Feb-2013 John McCall <rjmccall@apple.com> Add a new 'type_visibility' attribute to allow users to
control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-visibility.c
dd44f34301316b814277d6a8c146d86c7115330b 10-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Warn about visibility attributes in typedefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-visibility.c
98ae834a3e289f84f0765d0d0ca7ff22ccaba458 10-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix an old (2009) FIXME:

// FIXME: This needs to happen before we merge declarations. Then,
// let attribute merging cope with attribute conflicts.

This was already being done for variables, but for functions we were merging
then first and then applying the attributes. To avoid duplicating merging
logic, some of the helpers in SemaDeclAttr.cpp become methods that can
handle merging two attributes in one decl or inheriting attributes from one
decl to another.

With this change we are now able to produce errors for variables with
incompatible visibility attributes or warn about unused dllimports in
variables.

This changes the attribute list iteration back to being in reverse source
code order, as that matches what decl merging does and avoids differentiating
the two cases is the merge*Attr methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-visibility.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-visibility.c
548d17c977959a5ed395ea1a407901f1314e575c 02-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Walk the decls looking for the last one that has an attribute. We do have to walk
them, otherwise we cannot produce an error for both

struct HIDDEN test4; // canonical
struct test4;
struct DEFAULT test4;

and

struct test5; // canonical
struct HIDDEN test5;
struct DEFAULT test5;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-visibility.c
4e31b4d6cf25029aa280d691e9023359c0ef4204 01-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Extend the error about incompatible visibility attributes in different
decls to work on function templates specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-visibility.c
45a0b264512ee0e9ba874bb3bfeb7f5b96789117 26-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Reject cases like

struct __attribute__((visibility("hidden"))) a;
struct __attribute__((visibility("default"))) b;

which gcc already rejects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/attr-visibility.c
4188760f6bb20f91c6883dffd89204419f852dee 29-Jan-2012 John McCall <rjmccall@apple.com> Complain about attempts to use 'protected' visibility on targets
like Darwin that don't support it. We should also complain about
invalid -fvisibility=protected, but that information doesn't seem
to exist at the most appropriate time, so I've left a FIXME behind.

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