summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/templates-right.h
Commit message (Collapse)AuthorAgeFilesLines
* [modules] Fix assert if multiple update records provide a definition for aRichard Smith2016-10-261-0/+2
| | | | | | class template specialization and that specialization has attributes. llvm-svn: 285160
* [modules] When instantiating the contents of an imported CXXRecordDecl, we canRichard Smith2015-08-111-0/+4
| | | | | | | | emit lexical contents for a declaration for another module. Track which module those contents came from, and ensure that we only grab the lexical contents from a single such instantiation. llvm-svn: 244682
* [modules] Use DeclContext::equals rather than == on DeclContext* whenRichard Smith2014-09-031-0/+4
| | | | | | | | | | determining whether a declaration is out of line, instead of assuming that the semantic and lexical DeclContext will be the same declaration whenever they're the same entity. This fixes behavior of declarations within merged classes and enums. llvm-svn: 217008
* When merging functions across modules (and in particular, instantiations ofRichard Smith2014-05-291-0/+4
| | | | | | | member functions), ensure that the redecl chain never transitions from 'inline' to 'not inline', since that violates an AST invariant. llvm-svn: 209794
* When two templates get merged together, also merge their pattern declarationsRichard Smith2014-04-241-0/+2
| | | | | | | | | | | | | | together. This is extremely hairy, because in general we need to have loaded both the template and the pattern before we can determine whether either should be merged, so we temporarily violate the rule that all merging happens before reading a decl ends, but *only* in the case where a template's pattern is being loaded while loading the template itself. In order to accomodate this for class templates, delay loading the injected class name type for the pattern of the template until after we've loaded the template itself, if we happen to load the template first. llvm-svn: 207063
* When a module completes the definition of a class template specialization ↵Richard Smith2014-04-191-0/+6
| | | | | | imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations. llvm-svn: 206680
* When merging class definitions across modules in C++, merge together fields.Richard Smith2013-10-071-0/+4
| | | | | | | | | This change doesn't go all the way to making fields redeclarable; instead, it makes them 'mergeable', which means we can find the canonical declaration, but not much else (and for a declaration that's not from a module, the canonical declaration is always that declaration). llvm-svn: 192092
* C++ modules: if a class is defined in multiple modules (for instance, becauseRichard Smith2013-09-091-0/+2
| | | | | | | | | | | | 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
* Use @import rather than @__experimental_modules_import, since theDouglas Gregor2012-12-111-1/+1
| | | | | | latter is rather a mess to type. llvm-svn: 169919
* Only those InterestingDecls that got added to the AST should be passed to ↵Axel Naumann2012-10-021-2/+4
| | | | | | the ASTConsumer. llvm-svn: 165001
* Merge pending instantiations instead of overwriting existing ones.Axel Naumann2012-10-021-0/+25
Check whether a pending instantiation needs to be instantiated (or whether an instantiation already exists). Verify the size of the PendingInstantiations record (was only checking size of existing PendingInstantiations). Migrate Obj-C++ part of redecl-merge into separate test, now that this is growing. templates.mm: test that CodeGen has seen exactly one definition of template instantiations. redecl-merge.m: use "@" specifier for expected-diagnostics. llvm-svn: 164993
OpenPOWER on IntegriCloud