diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-11 02:15:51 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-11 02:15:51 +0000 |
commit | f2f15b3bc6820469024db170c87ffe885ec53cf9 (patch) | |
tree | 623921033ba05d8c71e8ea1d325b719d584d91da /lib/Sema/SemaDecl.cpp | |
parent | 3d40f96394fb30b70ba83bdfd10f3ed69530b0e5 (diff) |
Don't process #pragma visibility during instantiation. The visibility of the
instantiation depends on the template, its arguments and parameters, but not
where it is instantiated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
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); } |