diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-10 13:01:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-10 13:01:40 +0000 |
commit | 2f47c366bcc28f54f22df6b4266b5d14de302ced (patch) | |
tree | bcdaf3f388d6d51f64490b876a947c809614b4d1 /lib | |
parent | f4b88a45902af1802a1cb42ba48b1c474474f228 (diff) |
The type of a definition should not increase its visibility. Fixes PR12221.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Decl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index ded507ef8e..0e2793490d 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -335,8 +335,8 @@ static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, LVFlags F) { LinkageInfo TypeLV = getLVForType(Var->getType()); if (TypeLV.linkage() != ExternalLinkage) return LinkageInfo::uniqueExternal(); - if (!LV.visibilityExplicit()) - LV.mergeVisibility(TypeLV.visibility(), TypeLV.visibilityExplicit()); + LV.mergeVisibilityWithMin(TypeLV.visibility(), + TypeLV.visibilityExplicit()); } if (Var->getStorageClass() == SC_PrivateExtern) |