Reinstate r284008 reverted in r284081, with two fixes:1) Merge and demote variable definitions when we find a redefinition inMergeVarDecls, not only when we find one in AddInitializerToDecl (we on
Reinstate r284008 reverted in r284081, with two fixes:1) Merge and demote variable definitions when we find a redefinition inMergeVarDecls, not only when we find one in AddInitializerToDecl (we only reachthe second case if it's the addition of the initializer itself that converts anexisting declaration into a definition). 2) When rebuilding a redeclaration chain for a variable, if we merge twodefinitions together, mark the definitions as merged so the retained definitionis made visible whenever the demoted definition would have been.Original commit message (from r283882):[modules] PR28752: Do not instantiate variable declarations which are not visible.Original patch by Vassil Vassilev! Changes listed above are mine.llvm-svn: 284284
show more ...
Revert r284008. This is us to fail to instantiate static data members in somecases. I'm working on reducing a testcase.llvm-svn: 284081
Reinstate r283887 and r283882.Original message:"[modules] PR28752: Do not instantiate variable declarations which are not visible.https://reviews.llvm.org/D24508Patch developed in collaboratio
Reinstate r283887 and r283882.Original message:"[modules] PR28752: Do not instantiate variable declarations which are not visible.https://reviews.llvm.org/D24508Patch developed in collaboration with Richard Smith!"llvm-svn: 284008
Revert r283887 and r283882, until the issue is understood and fixed.llvm-svn: 283890
[modules] PR28752: Do not instantiate variable declarations which are not visible.https://reviews.llvm.org/D24508Patch developed in collaboration with Richard Smith!llvm-svn: 283882