[cfe-commits] r111740 - /cfe/trunk/lib/Sema/SemaOverload.cpp
Fariborz Jahanian
fjahanian at apple.com
Sat Aug 21 10:11:09 PDT 2010
Author: fjahanian
Date: Sat Aug 21 12:11:09 2010
New Revision: 111740
URL: http://llvm.org/viewvc/llvm-project?rev=111740&view=rev
Log:
twik to my previous patch for pr7936.
Build qualified version of ObjC pointers (not pointers) when
doing overload resolution.
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=111740&r1=111739&r2=111740&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Sat Aug 21 12:11:09 2010
@@ -4171,9 +4171,12 @@
QualType PointeeTy;
const PointerType *PointerTy = Ty->getAs<PointerType>();
+ bool buildObjCPtr = false;
if (!PointerTy) {
- if (const ObjCObjectPointerType *PTy = Ty->getAs<ObjCObjectPointerType>())
+ if (const ObjCObjectPointerType *PTy = Ty->getAs<ObjCObjectPointerType>()) {
PointeeTy = PTy->getPointeeType();
+ buildObjCPtr = true;
+ }
else
assert(false && "type was not a pointer type!");
}
@@ -4200,7 +4203,10 @@
if ((CVR & Qualifiers::Volatile) && !hasVolatile) continue;
if ((CVR & Qualifiers::Restrict) && !hasRestrict) continue;
QualType QPointeeTy = Context.getCVRQualifiedType(PointeeTy, CVR);
- PointerTypes.insert(Context.getPointerType(QPointeeTy));
+ if (!buildObjCPtr)
+ PointerTypes.insert(Context.getPointerType(QPointeeTy));
+ else
+ PointerTypes.insert(Context.getObjCObjectPointerType(QPointeeTy));
}
return true;
More information about the cfe-commits
mailing list