10 #ifndef LLVM_CLANG_AST_NSAPI_H
11 #define LLVM_CLANG_AST_NSAPI_H
14 #include "llvm/ADT/ArrayRef.h"
15 #include "llvm/ADT/Optional.h"
19 class ObjCInterfaceDecl;
65 return isObjCEnumerator(E,
"NSUTF8StringEncoding", NSUTF8StringEncodingId);
71 return isObjCEnumerator(E,
"NSASCIIStringEncoding",NSASCIIStringEncodingId);
142 return getOrInitSelector(StringRef(
"objectForKeyedSubscript"),
143 objectForKeyedSubscriptSel);
148 return getOrInitSelector(StringRef(
"objectAtIndexedSubscript"),
149 objectAtIndexedSubscriptSel);
154 StringRef Ids[] = {
"setObject",
"forKeyedSubscript" };
155 return getOrInitSelector(Ids, setObjectForKeyedSubscriptSel);
160 StringRef Ids[] = {
"setObject",
"atIndexedSubscript" };
161 return getOrInitSelector(Ids, setObjectAtIndexedSubscriptSel);
166 return getOrInitSelector(StringRef(
"isEqual"), isEqualSel);
193 bool Instance)
const;
229 bool isObjCEnumerator(
const Expr *E,
252 mutable Selector objectForKeyedSubscriptSel, objectAtIndexedSubscriptSel,
253 setObjectForKeyedSubscriptSel,setObjectAtIndexedSubscriptSel,
257 mutable IdentifierInfo *NSASCIIStringEncodingId, *NSUTF8StringEncodingId;
262 #endif // LLVM_CLANG_AST_NSAPI_H
Smart pointer class that efficiently represents Objective-C method names.
Selector getObjectAtIndexedSubscriptSelector() const
Returns selector for "objectAtIndexedSubscript:".
Optional< NSDictionaryMethodKind > getNSDictionaryMethodKind(Selector Sel)
Return NSDictionaryMethodKind if Sel is such a selector.
NSNumberLiteralMethodKind
Enumerates the NSNumber methods used to generate literals.
Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const
The Objective-C NSDictionary selectors.
NSDictionaryMethodKind
Enumerates the NSDictionary/NSMutableDictionary methods used to generate literals and to apply some c...
bool isNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, Selector Sel) const
Selector getNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, bool Instance) const
The Objective-C NSNumber selectors used to create NSNumber literals.
bool isObjCNSUIntegerType(QualType T) const
Returns true if.
IdentifierInfo * getNSClassId(NSClassIdKindKind K) const
Selector getNSStringSelector(NSStringMethodKind MK) const
The Objective-C NSString selectors.
Optional< NSSetMethodKind > getNSSetMethodKind(Selector Sel)
Return NSSetMethodKind if Sel is such a selector.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Optional< NSNumberLiteralMethodKind > getNSNumberLiteralMethodKind(Selector Sel) const
Return NSNumberLiteralMethodKind if Sel is such a selector.
Selector getIsEqualSelector() const
Returns selector for "isEqual:".
bool isNSUTF8StringEncodingConstant(const Expr *E) const
Returns true if the expression.
static const unsigned NumClassIds
static const unsigned NumNSNumberLiteralMethods
NSSetMethodKind
Enumerates the NSMutableSet/NSOrderedSet methods used to apply some checks.
Represents an ObjC class declaration.
static const unsigned NumNSSetMethods
Selector getSetObjectAtIndexedSubscriptSelector() const
Returns selector for "setObject:atIndexedSubscript".
NSArrayMethodKind
Enumerates the NSArray/NSMutableArray methods used to generate literals and to apply some checks...
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
bool isObjCNSIntegerType(QualType T) const
Returns true if.
bool isMacroDefined(StringRef Id) const
Returns true if Id is currently defined as a macro.
Selector getNSSetSelector(NSSetMethodKind MK) const
The Objective-C NSSet selectors.
StringRef GetNSIntegralKind(QualType T) const
Returns one of NSIntegral typedef names if.
Selector getObjectForKeyedSubscriptSelector() const
Returns selector for "objectForKeyedSubscript:".
bool isNSASCIIStringEncodingConstant(const Expr *E) const
Returns true if the expression.
Selector getNSArraySelector(NSArrayMethodKind MK) const
The Objective-C NSArray selectors.
bool isSubclassOfNSClass(ObjCInterfaceDecl *InterfaceDecl, NSClassIdKindKind NSClassKind) const
Returns true if InterfaceDecl is subclass of NSClassKind.
ASTContext & getASTContext() const
Selector getSetObjectForKeyedSubscriptSelector() const
Returns selector for "setObject:forKeyedSubscript".
Optional< NSStringMethodKind > getNSStringMethodKind(Selector Sel) const
Return NSStringMethodKind if.
Optional< NSNumberLiteralMethodKind > getNSNumberFactoryMethodKind(QualType T) const
Determine the appropriate NSNumber factory method kind for a literal of the given type...
static const unsigned NumNSArrayMethods
static const unsigned NumNSDictionaryMethods
Optional< NSArrayMethodKind > getNSArrayMethodKind(Selector Sel)
Return NSArrayMethodKind if Sel is such a selector.
bool isObjCBOOLType(QualType T) const
Returns true if.
static const unsigned NumNSStringMethods