]> granicus.if.org Git - clang/commit
Now that we check visibility attributes in an appropriate order,
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 19 Apr 2012 05:24:05 +0000 (05:24 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 19 Apr 2012 05:24:05 +0000 (05:24 +0000)
commitd70d20a361b877d7156291acd1a83b5b1ac2655a
tree1124d090abb7f5ec9d1dd4fe46b28ea55a768146
parent4fc149057248a565ec9e539be66eeec42216282c
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155101 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
lib/AST/Decl.cpp