diff options
author | John McCall <rjmccall@apple.com> | 2010-12-10 11:01:00 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-10 11:01:00 +0000 |
commit | 49f4e1cbd839da27ff4814b4ea6d85a79f786cbd (patch) | |
tree | 9ab7a1af57b1fc26ad1d0b8913ac7da554101ff3 /lib/Sema/SemaOverload.cpp | |
parent | 55270e4bde91bd30d16086ae71f0f65caf3b8a51 (diff) |
It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 0ff8dc4ace..890854b897 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -5503,7 +5503,7 @@ Sema::AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, if (!VisibleTypeConversionsQuals.hasRestrict() && T.isRestrictQualified()) continue; - T = Q1.apply(T); + T = Q1.apply(Context, T); QualType ResultTy = Context.getLValueReferenceType(T); AddBuiltinCandidate(ResultTy, ParamTypes, Args, 2, CandidateSet); } @@ -6075,9 +6075,9 @@ void DiagnoseBadDeduction(Sema &S, OverloadCandidate *Cand, // Param will have been canonicalized, but it should just be a // qualified version of ParamD, so move the qualifiers to that. - QualifierCollector Qs(S.Context); + QualifierCollector Qs; Qs.strip(Param); - QualType NonCanonParam = Qs.apply(TParam->getTypeForDecl()); + QualType NonCanonParam = Qs.apply(S.Context, TParam->getTypeForDecl()); assert(S.Context.hasSameType(Param, NonCanonParam)); // Arg has also been canonicalized, but there's nothing we can do |