forked from OSchip/llvm-project
Fix a case when the TemplateArgs vector can be empty.
llvm-svn: 72911
This commit is contained in:
parent
dd050567c1
commit
dd096d888b
|
@ -2271,7 +2271,7 @@ Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation TemplateLoc,
|
|||
// template.
|
||||
llvm::SmallVector<TemplateArgument, 16> ConvertedTemplateArgs;
|
||||
if (CheckTemplateArgumentList(ClassTemplate, TemplateNameLoc, LAngleLoc,
|
||||
&TemplateArgs[0], TemplateArgs.size(),
|
||||
TemplateArgs.data(), TemplateArgs.size(),
|
||||
RAngleLoc, ConvertedTemplateArgs))
|
||||
return true;
|
||||
|
||||
|
|
|
@ -10,3 +10,6 @@ X<> *x3; // expected-error{{too few template arguments for class template 'X'}}
|
|||
template<typename U = float, int M> struct X;
|
||||
|
||||
X<> *x4;
|
||||
|
||||
template<typename T = int> struct Z;
|
||||
template struct Z<>;
|
||||
|
|
Loading…
Reference in New Issue