diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-10-09 16:34:40 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-10-09 16:34:40 +0000 |
commit | 5ecd5399421799892a2b3dc5456e816bd6d827ab (patch) | |
tree | 10c7fc78270342a53a71bc63ce7e007ffa5a2f35 | |
parent | 82887688bdd931c37488c9a8d089fd811485947f (diff) |
Use the new API for applying the qualifiers on built-in '->*'
operator's types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83648 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index f2142c5089..f710f1e2d5 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -3690,12 +3690,11 @@ Sema::AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, Ptr != CandidateTypes.pointer_end(); ++Ptr) { QualType C1Ty = (*Ptr); QualType C1; - unsigned CV1; + QualifierCollector Q1; if (const PointerType *PointerTy = C1Ty->getAs<PointerType>()) { - C1 = PointerTy->getPointeeType().getUnqualifiedType(); + C1 = QualType(Q1.strip(PointerTy->getPointeeType()), 0); if (!isa<RecordType>(C1)) continue; - CV1 = PointerTy->getPointeeType().getCVRQualifiers(); } for (BuiltinCandidateTypeSet::iterator MemPtr = CandidateTypes.member_pointer_begin(), @@ -3709,8 +3708,7 @@ Sema::AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, QualType ParamTypes[2] = { *Ptr, *MemPtr }; // build CV12 T& QualType T = mptr->getPointeeType(); - unsigned CV2 = T.getCVRQualifiers(); - T = Context.getCVRQualifiedType(T, (CV1 | CV2)); + T = Q1.apply(T); QualType ResultTy = Context.getLValueReferenceType(T); AddBuiltinCandidate(ResultTy, ParamTypes, Args, 2, CandidateSet); } |