19 #include "llvm/ADT/StringExtras.h"
20 #include "llvm/Support/ErrorHandling.h"
22 using namespace clang;
29 StringRef TDName = TD->getDecl()->getIdentifier()->getName();
30 if (TDName.startswith(Prefix) && TDName.endswith(
"Ref"))
33 if (TDName.startswith(
"xpc_"))
35 RetTy = TD->getDecl()->getUnderlyingType();
47 return Name.startswith(Prefix);
95 if (!ident)
return false;
96 StringRef functionName = ident->
getName();
104 for ( ; it != endI ; ++it) {
107 if (ch ==
'C' || ch ==
'c') {
109 if (ch ==
'c' && it != start &&
isLetter(*(it - 1)))
123 StringRef suffix = functionName.substr(it - start);
124 if (suffix.startswith(
"reate")) {
127 else if (suffix.startswith(
"opy")) {
bool hasDefinition() const
Determine whether this class has been defined.
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
PointerType - C99 6.7.5.1 - Pointer Declarators.
A (possibly-)qualified type.
IdentifierInfo * getIdentifier() const
getIdentifier - Get the identifier that names this declaration, if there is one.
C Language Family Type Representation.
static LLVM_READONLY bool isLetter(unsigned char c)
Return true if this character is an ASCII letter: [a-zA-Z].
bool isCocoaObjectRef(QualType T)
One of these records is kept for each identifier that is lexed.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
bool followsCreateRule(const FunctionDecl *FD)
Represents an ObjC class declaration.
StringRef getName() const
Return the actual identifier string.
bool isObjCQualifiedIdType() const
True if this is equivalent to 'id.
bool isCFObjectRef(QualType T)
const TemplateArgument * iterator
bool isObjCQualifiedClassType() const
True if this is equivalent to 'Class.
QualType getPointeeType() const
bool isRefType(QualType RetTy, StringRef Prefix, StringRef Name=StringRef())
Represents a pointer to an Objective C object.
static LLVM_READONLY bool isLowercase(unsigned char c)
Return true if this character is a lowercase ASCII letter: [a-z].
const T * getAs() const
Member-template getAs<specific type>'.
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.
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
bool isObjCObjectPointerType() const
ObjCInterfaceDecl * getSuperClass() const
bool isObjCIdType() const
True if this is equivalent to the 'id' type, i.e.