Fix the type of a enum non-type template argument within the instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72489 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 97eca48..b15ce29 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -1494,7 +1494,7 @@
}
Converted->push_back(TemplateArgument(StartLoc, Value,
- Context.getCanonicalType(IntegerType)));
+ ParamType->isEnumeralType() ? ParamType : IntegerType));
}
return false;