summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/cxx-templates-common.h
Commit message (Collapse)AuthorAgeFilesLines
* [modules] Enforce the rules that an explicit or partial specialization must beRichard Smith2016-05-051-0/+17
| | | | | | | | declared before it is used. Because we don't use normal name lookup to find these, the normal code to filter out non-visible names from name lookup results does not apply. llvm-svn: 268585
* [modules] When completing the redecl chain for an anonymous declaration in aRichard Smith2014-08-281-0/+1
| | | | | | | merged context, pull in the lexical decls in that context, since one of them may complete the redecl chain. llvm-svn: 216652
* [modules] Number anonymous declarations that are lexically within mergeableRichard Smith2014-08-281-0/+7
| | | | | | contexts, so that we can merge them when we merge the surrounding context. llvm-svn: 216639
* [modules] Track the described template in an alias declaration that is theRichard Smith2014-08-261-0/+4
| | | | | | | pattern of an alias template declaration. Use this to merge alias templates properly when they're members of class template specializations. llvm-svn: 216437
* [modules] Put class template declarations into the scope in which they'reRichard Smith2014-08-231-0/+2
| | | | | | | | | | | declared, rather than putting them into the template parameter scope. We previously had *no record* in the scope for class template declarations, once those declarations completed and their template parameter scopes were popped. This in turn caused us to be unable to merge class template declarations that were declared in the global scope (where we use scope lookup rather than DeclContext lookup for merging), when loading a module. llvm-svn: 216311
* [modules] Don't assert if the same imported class template specializationRichard Smith2014-08-141-0/+2
| | | | | | | declaration has its definition instantiated in two sibling modules and they use a partial specialization. llvm-svn: 215616
* [modules] When we merge together multiple class template specializationRichard Smith2014-08-141-0/+2
| | | | | | | | | | definitions (because some other declaration declares a special member that isn't present in the canonical definition), we need to search *all* of them; we can't just stop when we find the requested name in any of the definitions, because that can fail to find things (and in particular, it can fail to find the member of the canonical declaration and return a bogus ODR failure). llvm-svn: 215612
* [modules] Don't try to merge template specializations by performing name lookupRichard Smith2014-07-111-2/+2
| | | | | | | | | into their container; we won't find them there. These things are already being merged when they're added to their primary template's folding set, so this merging is redundant (and causes us to reject-valid because we think we've found an odr violation). llvm-svn: 212788
* [modules] If a referenced-but-not-instantiated class template specializationRichard Smith2014-05-231-0/+3
| | | | | | | | | | gets explicitly specialized, don't reuse the previous class template specialization declaration as a new declaration. The benefit here is fairly marginal, it harms source fidelity, and this is horrible to model if the specialization was imported from another module (without this change, it asserts or worse). llvm-svn: 209552
* If a class template specialization from one module has its definitionRichard Smith2014-05-221-0/+3
| | | | | | | | | instantiated in another module, and the instantiation uses a partial specialization, include the partial specialization and its template arguments in the update record. We'll need them if someone imports the second module and tries to instantiate a member of the template. llvm-svn: 209472
* If two sibling modules declare the same entity, and we indirectly pull aRichard Smith2014-05-191-0/+7
| | | | | | | | declaration of that entity in from one of those modules, keep track of the fact that we've not completed the redeclaration chain yet so that we can pull the remaining declarations in from the other module if they're needed. llvm-svn: 209161
* If an instantiation of a template is required to be a complete type, checkRichard Smith2014-05-071-0/+2
| | | | | | | whether the definition of the template is visible rather than checking whether the instantiated definition happens to be in an imported module. llvm-svn: 208150
* When we inject a declaration into a namespace, add the primary DeclContext toRichard Smith2014-03-231-0/+6
| | | | | | | the update set rather than the current DeclContext. Add test for the local extern case too. llvm-svn: 204568
* If a template instantation introduces a name into a namespace, we need to writeRichard Smith2014-03-231-0/+6
| | | | | | | out a visible update record for that namespace even if it was never declared in this module. llvm-svn: 204554
* C++ modules: merging for enumerations and enumerators with multiple definitionsRichard Smith2013-10-151-0/+4
| | | | | | (eg through template instantiations in multiple modules). llvm-svn: 192740
* When we perform dependent name lookup during template instantiation, it's notRichard Smith2013-07-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sufficient to only consider names visible at the point of instantiation, because that may not include names that were visible when the template was defined. More generally, if the instantiation backtrace goes through a module M, then every declaration visible within M should be available to the instantiation. Any of those declarations might be part of the interface that M intended to export to a template that it instantiates. The fix here has two parts: 1) If we find a non-visible declaration during name lookup during template instantiation, check whether the declaration was visible from the defining module of all entities on the active template instantiation stack. The defining module is not the owning module in all cases: we look at the module in which a template was defined, not the module in which it was first instantiated. 2) Perform pending instantiations at the end of a module, not at the end of the translation unit. This is general goodness, since it significantly cuts down the amount of redundant work that is performed in every TU importing a module, and also implicitly adds the module containing the point of instantiation to the set of modules checked for declarations in a lookup within a template instantiation. There's a known issue here with template instantiations performed while building a module, if additional imports are added later on. I'll fix that in a subsequent commit. llvm-svn: 187167
* Fix deserializing of class template partial specializations. Assign sequenceRichard Smith2013-06-251-0/+1
numbers as we deserialize class template partial specializations. We can't assume that the old sequence numbers will work. The sequence numbers are still deterministic, but are now a lot less predictable for class template partial specializations in modules/PCH. llvm-svn: 184811
OpenPOWER on IntegriCloud