summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-11 18:22:40 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-11 18:22:40 +0000
commit1515f76a5a0858da1bd3b360b99b3866cca29d51 (patch)
treeab6eff4d3005875c43b1a9f59609bbe282bff7f9 /clang/lib/Sema/SemaTemplate.cpp
parent5f14a01340ad7c69df35a13b21116b70eab95a28 (diff)
downloadbcm5719-llvm-1515f76a5a0858da1bd3b360b99b3866cca29d51.tar.gz
bcm5719-llvm-1515f76a5a0858da1bd3b360b99b3866cca29d51.zip
Reverted r64307. Moved hasSameType and hasSameUnqualifiedType from
Sema to ASTContext. llvm-svn: 64312
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index b4436a2c3c1..5fe592d5e37 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -920,7 +920,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
(ParamType->isMemberPointerType() &&
ParamType->getAsMemberPointerType()->getPointeeType()
->isFunctionType())) {
- if (ArgType.isSameIgnoringQualifiers(ParamType.getNonReferenceType())) {
+ if (Context.hasSameUnqualifiedType(ArgType, ParamType.getNonReferenceType())) {
// We don't have to do anything: the types already match.
} else if (ArgType->isFunctionType() && ParamType->isPointerType()) {
ArgType = Context.getPointerType(ArgType);
@@ -935,7 +935,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
}
}
- if (!ArgType.isSameIgnoringQualifiers(ParamType.getNonReferenceType())) {
+ if (!Context.hasSameUnqualifiedType(ArgType, ParamType.getNonReferenceType())) {
// We can't perform this conversion.
Diag(Arg->getSourceRange().getBegin(),
diag::err_template_arg_not_convertible)
@@ -965,7 +965,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
ImpCastExprToType(Arg, ParamType);
}
- if (!ArgType.isSameIgnoringQualifiers(ParamType)) {
+ if (!Context.hasSameUnqualifiedType(ArgType, ParamType)) {
// We can't perform this conversion.
Diag(Arg->getSourceRange().getBegin(),
diag::err_template_arg_not_convertible)
@@ -988,7 +988,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
assert(ParamRefType->getPointeeType()->isObjectType() &&
"Only object references allowed here");
- if (!ArgType.isSameIgnoringQualifiers(ParamRefType->getPointeeType())) {
+ if (!Context.hasSameUnqualifiedType(ParamRefType->getPointeeType(), ArgType)) {
Diag(Arg->getSourceRange().getBegin(),
diag::err_template_arg_no_ref_bind)
<< Param->getType() << Arg->getType()
@@ -1020,7 +1020,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
// member, qualification conversions (4.4) are applied.
assert(ParamType->isMemberPointerType() && "Only pointers to members remain");
- if (ParamType.isSameIgnoringQualifiers(ArgType)) {
+ if (Context.hasSameUnqualifiedType(ParamType, ArgType)) {
// Types match exactly: nothing more to do here.
} else if (IsQualificationConversion(ArgType, ParamType)) {
ImpCastExprToType(Arg, ParamType);
OpenPOWER on IntegriCloud