aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-07-12 04:47:34 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-07-12 04:47:34 +0000
commit5e06529f3bbb4459be21b57dd918880a02f95cb2 (patch)
tree62ef81923692c64eafd5e438e4a4481c261ad67d /lib/Sema/SemaDecl.cpp
parentf729ce0b231e045b8e7db61e85e87186c09db238 (diff)
Process #pragma visibility early in the parsing of class definitions. Fixes
pr13338. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index dfe2882166..47453762d9 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/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();