diff options
author | John McCall <rjmccall@apple.com> | 2013-02-20 01:54:26 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-02-20 01:54:26 +0000 |
commit | d4c3d66be70ae2d0bd828329022dc428cc277a1c (patch) | |
tree | b980077d0866c29bcf09476b73c6a1d234727872 /lib/Sema/SemaDecl.cpp | |
parent | 975d52c759a0da21461668bac840bb5d21061d1b (diff) |
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
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 7667681c79..189b3d94e2 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1835,6 +1835,9 @@ bool Sema::mergeDeclAttribute(NamedDecl *D, InheritableAttr *Attr, else if (VisibilityAttr *VA = dyn_cast<VisibilityAttr>(Attr)) NewAttr = mergeVisibilityAttr(D, VA->getRange(), VA->getVisibility(), AttrSpellingListIndex); + else if (TypeVisibilityAttr *VA = dyn_cast<TypeVisibilityAttr>(Attr)) + NewAttr = mergeTypeVisibilityAttr(D, VA->getRange(), VA->getVisibility(), + AttrSpellingListIndex); else if (DLLImportAttr *ImportA = dyn_cast<DLLImportAttr>(Attr)) NewAttr = mergeDLLImportAttr(D, ImportA->getRange(), AttrSpellingListIndex); |