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 | 1fa9fade3855a0c8c1bc067a3f322fdef05191d9 (patch) | |
| tree | 8b9e75e7de861cbfcfb60e8b4adce6474a919744 /clang/lib/Sema | |
| parent | 73daa0f74038dce747db9aaaa208889b0cbef6c1 (diff) | |
| download | bcm5719-llvm-1fa9fade3855a0c8c1bc067a3f322fdef05191d9.tar.gz bcm5719-llvm-1fa9fade3855a0c8c1bc067a3f322fdef05191d9.zip | |
Handle #pragma visibility in explicit specializations and enums.
llvm-svn: 160057
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 576cbd150a4..607f57d74fd 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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 |

