diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-11 22:00:24 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-11 22:00:24 +0000 |
| commit | 9c9173dcc80da2f45bd220bf32256266e07f4fa0 (patch) | |
| tree | ad6a6806ceda2934fb231e205b6d3d75cb604699 /clang/test/Modules | |
| parent | c6f046893779316739e356180708781a412c5ce0 (diff) | |
| download | bcm5719-llvm-9c9173dcc80da2f45bd220bf32256266e07f4fa0.tar.gz bcm5719-llvm-9c9173dcc80da2f45bd220bf32256266e07f4fa0.zip | |
[modules] When instantiating the contents of an imported CXXRecordDecl, we can
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
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/templates-right.h | 4 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/templates-top.h | 1 | ||||
| -rw-r--r-- | clang/test/Modules/templates.mm | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/templates-right.h b/clang/test/Modules/Inputs/templates-right.h index daea97b86b8..32487c60c26 100644 --- a/clang/test/Modules/Inputs/templates-right.h +++ b/clang/test/Modules/Inputs/templates-right.h @@ -38,6 +38,10 @@ int defineListDoubleRight() { return ld.size; } +inline void defineListLongRight() { + List<long> ll; +} + template<typename T> struct MergePatternDecl; void outOfLineInlineUseRightF(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::f); diff --git a/clang/test/Modules/Inputs/templates-top.h b/clang/test/Modules/Inputs/templates-top.h index 31f5e419928..a0826835239 100644 --- a/clang/test/Modules/Inputs/templates-top.h +++ b/clang/test/Modules/Inputs/templates-top.h @@ -10,6 +10,7 @@ public: }; extern List<double> *instantiateListDoubleDeclaration; +extern List<long> *instantiateListLongDeclaration; namespace A { class Y { diff --git a/clang/test/Modules/templates.mm b/clang/test/Modules/templates.mm index 4c6e4723a3b..190084ad2b7 100644 --- a/clang/test/Modules/templates.mm +++ b/clang/test/Modules/templates.mm @@ -28,6 +28,8 @@ void testTemplateClasses() { N::Set<char> set_char; set_char.insert('A'); + static_assert(sizeof(List<long>) == sizeof(List<short>), ""); + List<double> list_double; list_double.push_back(0.0); } |

