Fix a problem with bogus template shadowing warnings
llvm-svn: 64230
This commit is contained in:
parent
dba326363c
commit
85e8b3eeed
|
@ -251,9 +251,12 @@ Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {
|
||||||
SourceLocation TemplateLoc = ConsumeToken();
|
SourceLocation TemplateLoc = ConsumeToken();
|
||||||
TemplateParameterList TemplateParams;
|
TemplateParameterList TemplateParams;
|
||||||
SourceLocation LAngleLoc, RAngleLoc;
|
SourceLocation LAngleLoc, RAngleLoc;
|
||||||
if(!ParseTemplateParameters(Depth + 1, TemplateParams, LAngleLoc,
|
{
|
||||||
RAngleLoc)) {
|
ParseScope TemplateParmScope(this, Scope::TemplateParamScope);
|
||||||
return 0;
|
if(!ParseTemplateParameters(Depth + 1, TemplateParams, LAngleLoc,
|
||||||
|
RAngleLoc)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate a meaningful error if the user forgot to put class before the
|
// Generate a meaningful error if the user forgot to put class before the
|
||||||
|
|
|
@ -39,10 +39,10 @@ template<int N = 5, // expected-note{{previous default template argument define
|
||||||
int M> // expected-error{{template parameter missing a default argument}}
|
int M> // expected-error{{template parameter missing a default argument}}
|
||||||
class B1n;
|
class B1n;
|
||||||
|
|
||||||
// FIXME: spurious "shadow" warning!
|
// Check for bogus template parameter shadow warning.
|
||||||
//template<template<class T> class = Y1,
|
template<template<class T> class,
|
||||||
// template<class T> class>
|
template<class T> class>
|
||||||
// class B1fixme;
|
class B1noshadow;
|
||||||
|
|
||||||
// C++ [temp.param]p10:
|
// C++ [temp.param]p10:
|
||||||
template<class T1, class T2 = int> class B2;
|
template<class T1, class T2 = int> class B2;
|
||||||
|
|
Loading…
Reference in New Issue