forked from OSchip/llvm-project
Fix the type of a enum non-type template argument within the instantiation.
llvm-svn: 72489
This commit is contained in:
parent
4db1631a43
commit
eed3d4c73e
|
@ -1494,7 +1494,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
|
|||
}
|
||||
|
||||
Converted->push_back(TemplateArgument(StartLoc, Value,
|
||||
Context.getCanonicalType(IntegerType)));
|
||||
ParamType->isEnumeralType() ? ParamType : IntegerType));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: clang-cc -fsyntax-only -verify %s
|
||||
|
||||
enum Enum { val = 1 };
|
||||
template <Enum v> struct C {
|
||||
typedef C<v> Self;
|
||||
};
|
||||
template struct C<val>;
|
Loading…
Reference in New Issue