summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/cxx-templates-a.h
Commit message (Collapse)AuthorAgeFilesLines
* [modules] When building an injected-class-name type, we may have to insert itRichard Smith2014-10-211-0/+5
| | | | | | into multiple merged classes' TypeForDecl slots. llvm-svn: 220331
* [modules] When instantiating a class member, don't expect to find the previousRichard Smith2014-10-111-0/+2
| | | | | | | declaration in the instantiation if the previous declaration came from another definition of the class template that got merged into the pattern definition. llvm-svn: 219552
* [modules] Delay loading the field declared with an anonymous tag declarationRichard Smith2014-10-101-0/+8
| | | | | | until after we've had a chance to merge that tag. llvm-svn: 219539
* [modules] When completing the redecl chain for an anonymous declaration in aRichard Smith2014-08-281-1/+2
| | | | | | | 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/+1
| | | | | | 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/+2
| | | | | | | 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] Don't assert if the same imported class template specializationRichard Smith2014-08-141-0/+1
| | | | | | | 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] Add testcase for a bug reduced from a selfhost issue. This bug wasRichard Smith2014-07-291-0/+7
| | | | | | | never present in Clang trunk, but was present in some of my development work, and it seems like a useful test to have. llvm-svn: 214154
* Revert accidentally-committed files in r214151.Richard Smith2014-07-291-7/+0
| | | | llvm-svn: 214152
* [modules] Add missing #include, found by modules build. We need a classRichard Smith2014-07-291-0/+7
| | | | | | definition in order to apply isa<...>. llvm-svn: 214151
* [modules] PR20475: merging support for alias template declarations.Richard Smith2014-07-281-0/+2
| | | | llvm-svn: 214124
* [modules] When merging a class template, also merge the definition of its ↵Richard Smith2014-07-111-0/+6
| | | | | | pattern. llvm-svn: 212836
* [modules] Don't try to merge template specializations by performing name lookupRichard Smith2014-07-111-0/+4
| | | | | | | | | 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/+7
| | | | | | | | | | 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/+6
| | | | | | | | | 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 a template instantation introduces a name into a namespace, we need to writeRichard Smith2014-03-231-0/+2
| | | | | | | out a visible update record for that namespace even if it was never declared in this module. llvm-svn: 204554
* Test that we can merge together explicit and partial specializations fromRichard Smith2013-10-151-0/+8
| | | | | | merged declarations of a class template. llvm-svn: 192746
* C++ modules: merging for enumerations and enumerators with multiple definitionsRichard Smith2013-10-151-0/+7
| | | | | | (eg through template instantiations in multiple modules). llvm-svn: 192740
* Merge common pointers for redeclarations of the same template across modules.Richard Smith2013-10-131-0/+3
| | | | llvm-svn: 192560
* C++ modules: if a class is defined in multiple modules (for instance, becauseRichard Smith2013-09-091-0/+6
| | | | | | | | | | | | it is an implicit instantiation of a class template specialization), pick the first-loaded definition to be the canonical definition, and merge all other definitions into it. This is still rather incomplete -- we need to extend every form of declaration that can appear within a CXXRecordDecl to be redeclarable if it came from an AST file (this includes fields, enumerators, ...). llvm-svn: 190315
* When merging redeclaration chains across modules, if a declaration is visibleRichard Smith2013-08-021-0/+2
| | | | | | | | | | | | | | | | | | | in one module but is only declared as a friend in another module, keep it visible in the result of the merge. This is incomplete on two axes: 1) Our handling of local extern declarations is basically broken (we put them in the wrong decl context, and don't find them in redeclaration lookup, unless they've previously been declared), and this results in them making friends visible after a merge. 2) Eventually we'll need to mark that this has happened, and more carefully check whether a declaration should be visible if it was only visible in some of the modules in which it was declared. Fortunately it's rare for the identifier namespace of a declaration to change along its redeclaration chain. llvm-svn: 187639
* Fix assert when instantiating a default argument of a template defined in aRichard Smith2013-08-011-0/+2
| | | | | | module. llvm-svn: 187556
* 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/+6
| | | | | | | | | | 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
* Check for matching template-parameter-lists when merging template declarations.Richard Smith2013-06-241-0/+4
| | | | llvm-svn: 184791
* Slightly improve cross-module merging for function templates.Richard Smith2013-06-241-0/+6
llvm-svn: 184689
OpenPOWER on IntegriCloud