diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-04-27 23:34:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-04-27 23:34:22 +0000 |
commit | 1784688de7cce8fcf3cfaee6466f505745e5337f (patch) | |
tree | af11e77cc7839c8d06639165fb591c088beef68f /clang/lib/Sema/SemaTemplateDeduction.cpp | |
parent | c3c70018441603bdddef5e85fe8efbd66b86ab0e (diff) | |
download | bcm5719-llvm-1784688de7cce8fcf3cfaee6466f505745e5337f.tar.gz bcm5719-llvm-1784688de7cce8fcf3cfaee6466f505745e5337f.zip |
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.
llvm-svn: 130346
Diffstat (limited to 'clang/lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateDeduction.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 202a736f3fd..b395fcd33d5 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/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(); } } |