aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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();
}
}