summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-02-20 01:54:26 +0000
committerJohn McCall <rjmccall@apple.com>2013-02-20 01:54:26 +0000
commitd041a9bf2d99efe9ae4068eff98f5f5066cb717f (patch)
treeab93ddc82b9ca25b0631ca9c15e6253bc38227c3 /clang/lib/Sema/SemaDecl.cpp
parent98155ad3b55b9dd5e3c03949d852fb6b189394d7 (diff)
downloadbcm5719-llvm-d041a9bf2d99efe9ae4068eff98f5f5066cb717f.tar.gz
bcm5719-llvm-d041a9bf2d99efe9ae4068eff98f5f5066cb717f.zip
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 llvm-svn: 175587
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 7667681c796..189b3d94e2b 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud