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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index f9a487270b..576cbd150a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -10062,7 +10062,8 @@ void Sema::ActOnFields(Scope* S,
// 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())
+ if (Record && !Record->getDeclContext()->isRecord() &&
+ !isa<ClassTemplateSpecializationDecl>(Record))
AddPushedVisibilityAttribute(Record);
}