[cfe-commits] r83648 - /cfe/trunk/lib/Sema/SemaOverload.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Oct 9 09:34:41 PDT 2009
Author: fjahanian
Date: Fri Oct 9 11:34:40 2009
New Revision: 83648
URL: http://llvm.org/viewvc/llvm-project?rev=83648&view=rev
Log:
Use the new API for applying the qualifiers on built-in '->*'
operator's types.
Modified:
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=83648&r1=83647&r2=83648&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Oct 9 11:34:40 2009
@@ -3690,12 +3690,11 @@
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 @@
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);
}
More information about the cfe-commits
mailing list