aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
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 342acf825b..4041ccf9d3 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -8880,10 +8880,6 @@ CreateNewDecl:
if (Attr)
ProcessDeclAttributeList(S, New, Attr);
- // If there's a #pragma GCC visibility in scope, set the visibility of this
- // record.
- AddPushedVisibilityAttribute(New);
-
// If we're declaring or defining a tag in function prototype scope
// in C, note that this type can only be used within the function.
if (Name && S->isFunctionPrototypeScope() && !getLangOpts().CPlusPlus)
@@ -8946,6 +8942,10 @@ CreateNewDecl:
if (PrevDecl)
mergeDeclAttributes(New, PrevDecl);
+ // If there's a #pragma GCC visibility in scope, set the visibility of this
+ // record.
+ AddPushedVisibilityAttribute(New);
+
OwnedDecl = true;
return New;
}