Go to the documentation of this file.
9 #ifndef LLVM_CLANG_AST_NSAPI_H
10 #define LLVM_CLANG_AST_NSAPI_H
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/Optional.h"
18 class ObjCInterfaceDecl;
61 return isObjCEnumerator(E,
"NSUTF8StringEncoding", NSUTF8StringEncodingId);
67 return isObjCEnumerator(E,
"NSASCIIStringEncoding",NSASCIIStringEncodingId);
138 return getOrInitSelector(StringRef(
"objectForKeyedSubscript"),
139 objectForKeyedSubscriptSel);
144 return getOrInitSelector(StringRef(
"objectAtIndexedSubscript"),
145 objectAtIndexedSubscriptSel);
150 StringRef Ids[] = {
"setObject",
"forKeyedSubscript" };
151 return getOrInitSelector(Ids, setObjectForKeyedSubscriptSel);
156 StringRef Ids[] = {
"setObject",
"atIndexedSubscript" };
157 return getOrInitSelector(Ids, setObjectAtIndexedSubscriptSel);
162 return getOrInitSelector(StringRef(
"isEqual"), isEqualSel);
166 return getOrInitNullarySelector(
"new", NewSel);
170 return getOrInitNullarySelector(
"init", InitSel);
197 bool Instance)
const;
233 bool isObjCEnumerator(
const Expr *E,
257 mutable Selector objectForKeyedSubscriptSel, objectAtIndexedSubscriptSel,
258 setObjectForKeyedSubscriptSel,setObjectAtIndexedSubscriptSel,
259 isEqualSel, InitSel, NewSel;
262 mutable IdentifierInfo *NSASCIIStringEncodingId, *NSUTF8StringEncodingId;
267 #endif // LLVM_CLANG_AST_NSAPI_H
@ ClassId_NSMutableOrderedSet
Represents an ObjC class declaration.
@ NSStr_stringWithCString
Optional< NSNumberLiteralMethodKind > getNSNumberLiteralMethodKind(Selector Sel) const
Return NSNumberLiteralMethodKind if Sel is such a selector.
@ NSDict_initWithObjectsAndKeys
Selector getNSSetSelector(NSSetMethodKind MK) const
The Objective-C NSSet selectors.
bool isNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, Selector Sel) const
@ NSOrderedSet_setObjectAtIndex
IdentifierInfo * getNSClassId(NSClassIdKindKind K) const
static const unsigned NumClassIds
NSArrayMethodKind
Enumerates the NSArray/NSMutableArray methods used to generate literals and to apply some checks.
@ NSOrderedSet_insertObjectAtIndex
@ NSOrderedSet_replaceObjectAtIndexWithObject
static const unsigned NumNSArrayMethods
@ NSNumberWithUnsignedLongLong
@ NSStr_stringWithCStringEncoding
A (possibly-)qualified type.
@ NSMutableDict_setObjectForKey
static const unsigned NumNSSetMethods
bool isObjCBOOLType(QualType T) const
Returns true if.
Selector getInitSelector() const
Selector getNSArraySelector(NSArrayMethodKind MK) const
The Objective-C NSArray selectors.
ASTContext & getASTContext() const
@ NSOrderedSet_setObjectAtIndexedSubscript
bool isSubclassOfNSClass(ObjCInterfaceDecl *InterfaceDecl, NSClassIdKindKind NSClassKind) const
Returns true if InterfaceDecl is subclass of NSClassKind.
@ NSNumberWithUnsignedInteger
@ NSStr_initWithUTF8String
@ NSDict_dictionaryWithObjectForKey
bool isNSUTF8StringEncodingConstant(const Expr *E) const
Returns true if the expression.
@ NSMutableArr_replaceObjectAtIndex
static const unsigned NumNSDictionaryMethods
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
static const unsigned NumNSStringMethods
@ NSDict_initWithObjectsForKeys
@ NSNumberWithUnsignedShort
bool isObjCNSIntegerType(QualType T) const
Returns true if.
@ NSDict_dictionaryWithObjectsAndKeys
@ NSNumberWithUnsignedInt
@ NSDict_dictionaryWithObjectsForKeysCount
Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const
The Objective-C NSDictionary selectors.
@ NSNumberWithUnsignedLong
Selector getObjectForKeyedSubscriptSelector() const
Returns selector for "objectForKeyedSubscript:".
static const unsigned NumNSNumberLiteralMethods
bool isNSASCIIStringEncodingConstant(const Expr *E) const
Returns true if the expression.
Selector getSetObjectAtIndexedSubscriptSelector() const
Returns selector for "setObject:atIndexedSubscript".
Selector getObjectAtIndexedSubscriptSelector() const
Returns selector for "objectAtIndexedSubscript:".
@ NSStr_stringWithUTF8String
Optional< NSNumberLiteralMethodKind > getNSNumberFactoryMethodKind(QualType T) const
Determine the appropriate NSNumber factory method kind for a literal of the given type.
@ NSDict_dictionaryWithObjectsForKeys
Selector getIsEqualSelector() const
Returns selector for "isEqual:".
NSDictionaryMethodKind
Enumerates the NSDictionary/NSMutableDictionary methods used to generate literals and to apply some c...
NSNumberLiteralMethodKind
Enumerates the NSNumber methods used to generate literals.
Selector getNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, bool Instance) const
The Objective-C NSNumber selectors used to create NSNumber literals.
@ NSDict_dictionaryWithDictionary
Optional< NSArrayMethodKind > getNSArrayMethodKind(Selector Sel)
Return NSArrayMethodKind if Sel is such a selector.
One of these records is kept for each identifier that is lexed.
@ NSMutableDict_setValueForKey
Selector getSetObjectForKeyedSubscriptSelector() const
Returns selector for "setObject:forKeyedSubscript".
Optional< NSSetMethodKind > getNSSetMethodKind(Selector Sel)
Return NSSetMethodKind if Sel is such a selector.
Selector getNSStringSelector(NSStringMethodKind MK) const
The Objective-C NSString selectors.
@ NSNumberWithUnsignedChar
NSSetMethodKind
Enumerates the NSMutableSet/NSOrderedSet methods used to apply some checks.
@ NSDict_initWithDictionary
Smart pointer class that efficiently represents Objective-C method names.
@ NSMutableDict_setObjectForKeyedSubscript
@ NSMutableArr_setObjectAtIndexedSubscript
Selector getNewSelector() const
@ NSMutableArr_insertObjectAtIndex
Optional< NSDictionaryMethodKind > getNSDictionaryMethodKind(Selector Sel)
Return NSDictionaryMethodKind if Sel is such a selector.
@ ClassId_NSMutableDictionary
@ NSArr_arrayWithObjectsCount
This represents one expression.
StringRef GetNSIntegralKind(QualType T) const
Returns one of NSIntegral typedef names if.
bool isObjCNSUIntegerType(QualType T) const
Returns true if.
bool isMacroDefined(StringRef Id) const
Returns true if Id is currently defined as a macro.