forked from OSchip/llvm-project
parent
456c0f6738
commit
89bd0fc27d
|
@ -497,17 +497,15 @@ static bool isNSType(QualType T) {
|
||||||
if (!T->isPointerType())
|
if (!T->isPointerType())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Check the typedef for the name "CF" and the substring "Ref".
|
ObjCInterfaceType* OT = dyn_cast<ObjCInterfaceType>(T.getTypePtr());
|
||||||
|
|
||||||
TypedefType* TD = dyn_cast<TypedefType>(T.getTypePtr());
|
if (!OT)
|
||||||
|
|
||||||
if (!TD)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const char* TDName = TD->getDecl()->getIdentifier()->getName();
|
const char* ClsName = OT->getDecl()->getIdentifier()->getName();
|
||||||
assert (TDName);
|
assert (ClsName);
|
||||||
|
|
||||||
if (TDName[0] != 'N' || TDName[1] != 'S')
|
if (ClsName[0] != 'N' || ClsName[1] != 'S')
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue