aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateDeduction.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-04-27 23:34:22 +0000
committerDouglas Gregor <dgregor@apple.com>2011-04-27 23:34:22 +0000
commita459cc26f6c895ae48742a36203f753cea8b3e91 (patch)
treeb7fe1d3488c4a9406154ebea948184c661a2d660 /lib/Sema/SemaTemplateDeduction.cpp
parent20c0da7787c9a7d2529e42a4a91d777778595d74 (diff)
Clean up the handling of non-CVR qualifiers in template argument
deduction. The good news is that address spaces are a lot less broken in this regard than I'd expected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r--lib/Sema/SemaTemplateDeduction.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp
index 202a736f3f..b395fcd33d 100644
--- a/lib/Sema/SemaTemplateDeduction.cpp
+++ b/lib/Sema/SemaTemplateDeduction.cpp
@@ -949,7 +949,6 @@ DeduceTemplateArguments(Sema &S,
// If the argument type is an array type, move the qualifiers up to the
// top level, so they can be matched with the qualifiers on the parameter.
- // FIXME: address spaces, ObjC GC qualifiers
if (isa<ArrayType>(Arg)) {
Qualifiers Quals;
Arg = S.Context.getUnqualifiedArrayType(Arg, Quals);
@@ -2455,8 +2454,8 @@ static bool AdjustFunctionParmAndArgTypesForDeduction(Sema &S,
// C++0x [temp.deduct.call]p3:
// If P is a cv-qualified type, the top level cv-qualifiers of P's type
// are ignored for type deduction.
- if (ParamType.getCVRQualifiers())
- ParamType = ParamType.getLocalUnqualifiedType();
+ if (ParamType.hasQualifiers())
+ ParamType = ParamType.getUnqualifiedType();
const ReferenceType *ParamRefType = ParamType->getAs<ReferenceType>();
if (ParamRefType) {
QualType PointeeType = ParamRefType->getPointeeType();
@@ -2512,8 +2511,7 @@ static bool AdjustFunctionParmAndArgTypesForDeduction(Sema &S,
else {
// - If A is a cv-qualified type, the top level cv-qualifiers of A's
// type are ignored for type deduction.
- if (ArgType.getCVRQualifiers())
- ArgType = ArgType.getUnqualifiedType();
+ ArgType = ArgType.getUnqualifiedType();
}
}