llvm-project/lldb/scripts/clang.instantiate-complete-...

16 lines
634 B
Diff

Index: lib/Sema/SemaTemplateInstantiate.cpp
===================================================================
--- lib/Sema/SemaTemplateInstantiate.cpp (revision 145552)
+++ lib/Sema/SemaTemplateInstantiate.cpp (working copy)
@@ -1683,6 +1683,10 @@
TemplateSpecializationKind TSK,
bool Complain) {
bool Invalid = false;
+
+ RequireCompleteType(Pattern->getLocation(),
+ QualType(Pattern->getTypeForDecl(), 0),
+ diag::err_incomplete_type);
CXXRecordDecl *PatternDef
= cast_or_null<CXXRecordDecl>(Pattern->getDefinition());