[cfe-commits] r45561 - in /cfe/trunk: Sema/Sema.cpp Sema/Sema.h Sema/SemaExpr.cpp Sema/SemaStmt.cpp include/clang/Basic/DiagnosticKinds.def test/Parser/objc-forcollection-1.m test/Parser/objc-forcollection-neg.m
Chris Lattner
clattner at apple.com
Fri Jan 4 16:43:32 PST 2008
On Jan 4, 2008, at 4:03 PM, fjahanian wrote:
>> hi Fariborz,
>>
>>> +bool Sema::isObjcObjectPointerType(QualType type) const {
>>> + if (!type->isPointerType() && !type->isObjcQualifiedIdType())
>>> + return false;
>>> + if (type == Context.getObjcIdType() || type ==
>>> Context.getObjcClassType() ||
>>> + type->isObjcQualifiedIdType())
>>> + return true;
>>> +
>>> + while (type->isPointerType()) {
>>> + PointerType *pointerType =
>>> static_cast<PointerType*>(type.getTypePtr());
>>> + type = pointerType->getPointeeType();
>>> + }
>>> + return (type->isObjcInterfaceType() || type-
>>> >isObjcQualifiedIdType());
>>
>> This accepts Interface**** ?
>
> Yes. I tried to follow gcc's (which is also my implementation :).
> But this may be too generous. I will have to talk to Blaine to see
> if I can confine this to just top-level object pointer.
Ok, thanks!
-Chris
More information about the cfe-commits
mailing list