18#include "llvm/ADT/StringExtras.h"
19#include "llvm/Support/ErrorHandling.h"
28 StringRef TDName = TD->getDecl()->getIdentifier()->getName();
29 if (TDName.starts_with(Prefix) && TDName.ends_with(
"Ref"))
32 if (TDName.starts_with(
"xpc_"))
34 RetTy = TD->getDecl()->getUnderlyingType();
46 return Name.starts_with(Prefix);
87 if (!ID->hasDefinition())
90 for ( ; ID ; ID = ID->getSuperClass())
91 if (ID->getIdentifier()->getName() ==
"NSObject")
101 if (!ident)
return false;
102 StringRef functionName = ident->
getName();
104 StringRef::iterator it = functionName.begin();
105 StringRef::iterator start = it;
106 StringRef::iterator endI = functionName.end();
110 for ( ; it != endI ; ++it) {
113 if (ch ==
'C' || ch ==
'c') {
115 if (ch ==
'c' && it != start &&
isLetter(*(it - 1)))
129 StringRef suffix = functionName.substr(it - start);
130 if (suffix.starts_with(
"reate")) {
132 }
else if (suffix.starts_with(
"opy")) {
static bool isDiskArbitrationAPIRefType(QualType T)
Returns true when the passed-in type is a CF-style reference-counted type from the DiskArbitration fr...
C Language Family Type Representation.
Represents a function declaration or definition.
One of these records is kept for each identifier that is lexed.
StringRef getName() const
Return the actual identifier string.
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
Represents an ObjC class declaration.
Represents a pointer to an Objective C object.
bool isObjCQualifiedClassType() const
True if this is equivalent to 'Class.
bool isObjCQualifiedIdType() const
True if this is equivalent to 'id.
bool isObjCIdType() const
True if this is equivalent to the 'id' type, i.e.
ObjCInterfaceDecl * getInterfaceDecl() const
If this pointer points to an Objective @interface type, gets the declaration for that interface.
bool isObjCClassType() const
True if this is equivalent to the 'Class' type, i.e.
PointerType - C99 6.7.5.1 - Pointer Declarators.
QualType getPointeeType() const
A (possibly-)qualified type.
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
const T * castAs() const
Member-template castAs<specific type>.
bool isObjCObjectPointerType() const
const T * getAs() const
Member-template getAs<specific type>'.
bool isCocoaObjectRef(QualType T)
bool isRefType(QualType RetTy, StringRef Prefix, StringRef Name=StringRef())
bool followsCreateRule(const FunctionDecl *FD)
bool isCFObjectRef(QualType T)
The JSON file list parser is used to communicate input to InstallAPI.
LLVM_READONLY bool isLetter(unsigned char c)
Return true if this character is an ASCII letter: [a-zA-Z].
LLVM_READONLY bool isLowercase(unsigned char c)
Return true if this character is a lowercase ASCII letter: [a-z].
const FunctionProtoType * T