summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-04-19 05:24:05 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-04-19 05:24:05 +0000
commit1f073336b79db100cebbf84caa628974c9dafe11 (patch)
treef40343772d04ed22a07f1ecbe5c00fe32f2ed1ee /clang/lib/AST/Decl.cpp
parentb660efd57a669863b3618e5f4b6b9dc5a7034075 (diff)
downloadbcm5719-llvm-1f073336b79db100cebbf84caa628974c9dafe11.tar.gz
bcm5719-llvm-1f073336b79db100cebbf84caa628974c9dafe11.zip
Now that we check visibility attributes in an appropriate order,
there is no need for mergeVisibily to ever increase the visibility. Not doing so lets us replace an incorrect use of mergeVisibilityWithMin. The testcase struct HIDDEN RECT { int top; }; DEFAULT RECT foo = {0}; shows that we should give preference to one of the attributes instead of keeping the minimum. We still get this testcase wrong because mergeVisibily handles two explicit visibilities incorrectly, but this is a step in the right direction. llvm-svn: 155101
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index f26747bdf6f..f4c0aa3c6be 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -327,7 +327,7 @@ static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, LVFlags F) {
LinkageInfo TypeLV = getLVForType(Var->getType());
if (TypeLV.linkage() != ExternalLinkage)
return LinkageInfo::uniqueExternal();
- LV.mergeVisibilityWithMin(TypeLV);
+ LV.mergeVisibility(TypeLV);
}
if (Var->getStorageClass() == SC_PrivateExtern)
OpenPOWER on IntegriCloud