diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-11 18:14:09 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-11 18:14:09 +0000 |
commit | 8d71918ec9899b07a649ba3a3de2fb6a2e07ec4a (patch) | |
tree | e79840f7da3ef0707a9bb2f9806d4efeebe5c7f3 /lib/Sema/SemaDecl.cpp | |
parent | d4047b3d05f8998b7ca08d08a7e187f7bf1724c4 (diff) |
Handle #pragma visibility in explicit specializations and enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 576cbd150a..607f57d74f 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -8931,6 +8931,10 @@ void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD, if (isa<CXXRecordDecl>(Tag)) FieldCollector->FinishClass(); + // If there's a #pragma GCC visibility in scope, and this isn't a subclass, + // set the visibility of this record. + AddPushedVisibilityAttribute(Tag); + // Exit this scope of this tag's definition. PopDeclContext(); @@ -10059,12 +10063,6 @@ void Sema::ActOnFields(Scope* S, if (Attr) ProcessDeclAttributeList(S, Record, Attr); - - // If there's a #pragma GCC visibility in scope, and this isn't a subclass, - // set the visibility of this record. - if (Record && !Record->getDeclContext()->isRecord() && - !isa<ClassTemplateSpecializationDecl>(Record)) - AddPushedVisibilityAttribute(Record); } /// \brief Determine whether the given integral value is representable within |