From: Anders Carlsson Date: Fri, 5 Jun 2009 02:45:24 +0000 (+0000) Subject: Fix another crash and actually make the test case work. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4e2a2ce1101d875c4b69294416438007947daeb;p=clang Fix another crash and actually make the test case work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72913 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index c9277aab75..685bbf8420 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -2371,7 +2371,7 @@ Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation TemplateLoc, // arguments in the specialization. QualType WrittenTy = Context.getTemplateSpecializationType(Name, - &TemplateArgs[0], + TemplateArgs.data(), TemplateArgs.size(), Context.getTypeDeclType(Specialization)); Specialization->setTypeAsWritten(WrittenTy); diff --git a/test/SemaTemplate/default-arguments.cpp b/test/SemaTemplate/default-arguments.cpp index 0e4c36609d..5b6ab7d155 100644 --- a/test/SemaTemplate/default-arguments.cpp +++ b/test/SemaTemplate/default-arguments.cpp @@ -11,5 +11,5 @@ template struct X; X<> *x4; -template struct Z; +template struct Z { }; template struct Z<>;