summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index dfe2882166b..47453762d9d 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -8919,6 +8919,10 @@ void Sema::ActOnTagStartDefinition(Scope *S, Decl *TagD) {
PushDeclContext(S, Tag);
ActOnDocumentableDecl(TagD);
+
+ // If there's a #pragma GCC visibility in scope, set the visibility of this
+ // record.
+ AddPushedVisibilityAttribute(Tag);
}
Decl *Sema::ActOnObjCContainerStartDefinition(Decl *IDecl) {
@@ -8983,10 +8987,6 @@ 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();
OpenPOWER on IntegriCloud