[modules] Properly look up the owning module for an instantiation of a merged template.When looking for the template instantiation pattern of a templated entity,consistently select the definition
[modules] Properly look up the owning module for an instantiation of a merged template.When looking for the template instantiation pattern of a templated entity,consistently select the definition of the pattern if there is one. This meanswe'll pick the same owning module when we start instantiating a template thatwe'll later pick when determining which modules are visible during thatinstantiation.This reinstates r300650, reverted in r300659, with a fix for a regressionreported by Chandler after commit.llvm-svn: 300938
show more ...
Revert r300653 and r300650. The underlying commit fixes one issue withmodules but exposes much more widespread issues. Example and moreinformation is on the review thread for r300650.Original com
Revert r300653 and r300650. The underlying commit fixes one issue withmodules but exposes much more widespread issues. Example and moreinformation is on the review thread for r300650.Original commit summary:[modules] Properly look up the owning module for an instantiation of a merged template.llvm-svn: 300659
[modules] Properly look up the owning module for an instantiation of a merged template.When looking for the template instantiation pattern of a templated entity,consistently select the definition of the pattern if there is one. This meanswe'll pick the same owning module when we start instantiating a template thatwe'll later pick when determining which modules are visible during thatinstantiation.llvm-svn: 300650
Add new test file missing from r247486.llvm-svn: 247488
[modules] When picking one of two template declarations as a lookup result,it's not sufficient to prefer the declaration with more default arguments, orthe one that's visible; they might both be vi
[modules] When picking one of two template declarations as a lookup result,it's not sufficient to prefer the declaration with more default arguments, orthe one that's visible; they might both be visible, but one of them might havea visible default argument where the other has a hidden default argument.llvm-svn: 247486
[modules] When parsing the base specifiers of a parse-merged class, the currentcontext is the class itself but lookups should be performed starting with thelookup parent of the class (class and bas
[modules] When parsing the base specifiers of a parse-merged class, the currentcontext is the class itself but lookups should be performed starting with thelookup parent of the class (class and base members don't shadow types from thesurrounding context because they have not been declared yet).llvm-svn: 245236
[modules] Add (already passing) test for template default argument merging when the template is declared in a namespace.llvm-svn: 242653
[modules] Fix typo in default argument merging.llvm-svn: 239954
[modules] Don't allow use of non-visible (inherited) default template arguments.llvm-svn: 239487
[modules] Track all default template arguments for a given parameter acrossmodules, and allow use of a default template argument if any of the parametersproviding it is visible.llvm-svn: 239485
Revert accidentally-committed test change from r239447.llvm-svn: 239452
Refactor storage of default template arguments.This is just a preparatory step towards fixing visibility for default templatearguments in modules builds.llvm-svn: 239447
[modules] Fix some visibility issues with default template arguments.There are still problems here, but this is a better starting point.The main part of the change is: when doing a lookup that wo
[modules] Fix some visibility issues with default template arguments.There are still problems here, but this is a better starting point.The main part of the change is: when doing a lookup that would accept visibleor hidden declarations, prefer to produce the latest visible declaration ifthere are any visible declarations, rather than always producing the latestdeclaration.Thus, when we inherit default arguments (and other properties) from a previousdeclaration, we inherit them from the previous visible declaration; if theprevious declaration is hidden, we already suppress inheritance of defaultarguments.There are a couple of other changes here that fix latent bugs exposed by thischange.llvm-svn: 239371