summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
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
commit4dedd0ceb8b6a15b2c8c393863a2b59fa862f940 (patch)
treec87c740554d3b1e0183bcd7b8b7171b807f59278 /clang/lib/Sema
parent06e1b13209a8db42ee1cf4e5991ab4a839b9b9fd (diff)
downloadbcm5719-llvm-4dedd0ceb8b6a15b2c8c393863a2b59fa862f940.tar.gz
bcm5719-llvm-4dedd0ceb8b6a15b2c8c393863a2b59fa862f940.zip
Process #pragma visibility early in the parsing of class definitions. Fixes
pr13338. llvm-svn: 160105
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