aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-04 21:50:46 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-04 21:50:46 +0000
commitff5243981e2f6fb4a11ab7b81bf7accc226f2647 (patch)
tree3d6fe2dad94cff269b8f72f78f40d14a05a0f7aa /lib/Sema/SemaTemplate.cpp
parent938963f076418aa61b570e5317240f66642af2df (diff)
Fix a little canonical-types issue with non-type template arguments.
Fixes PR5349. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 3c56358d5a..5ef370104d 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -1995,7 +1995,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
ArgType = Context.getCanonicalType(ArgType).getUnqualifiedType();
// Try to convert the argument to the parameter's type.
- if (ParamType == ArgType) {
+ if (Context.hasSameType(ParamType, ArgType)) {
// Okay: no conversion necessary
} else if (IsIntegralPromotion(Arg, ArgType, ParamType) ||
!ParamType->isEnumeralType()) {