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;
64 return isObjCEnumerator(E,
"NSUTF8StringEncoding", NSUTF8StringEncodingId);
70 return isObjCEnumerator(E,
"NSASCIIStringEncoding",NSASCIIStringEncodingId);
141 return getOrInitSelector(StringRef(
"objectForKeyedSubscript"),
142 objectForKeyedSubscriptSel);
147 return getOrInitSelector(StringRef(
"objectAtIndexedSubscript"),
148 objectAtIndexedSubscriptSel);
153 StringRef Ids[] = {
"setObject",
"forKeyedSubscript" };
154 return getOrInitSelector(Ids, setObjectForKeyedSubscriptSel);
159 StringRef Ids[] = {
"setObject",
"atIndexedSubscript" };
160 return getOrInitSelector(Ids, setObjectAtIndexedSubscriptSel);
165 return getOrInitSelector(StringRef(
"isEqual"), isEqualSel);
169 return getOrInitNullarySelector(
"new", NewSel);
173 return getOrInitNullarySelector(
"init", InitSel);
200 bool Instance)
const;
236 bool isObjCEnumerator(
const Expr *E,
260 mutable Selector objectForKeyedSubscriptSel, objectAtIndexedSubscriptSel,
261 setObjectForKeyedSubscriptSel,setObjectAtIndexedSubscriptSel,
262 isEqualSel, InitSel, NewSel;
265 mutable IdentifierInfo *NSASCIIStringEncodingId, *NSUTF8StringEncodingId;
270 #endif // LLVM_CLANG_AST_NSAPI_H Selector getObjectAtIndexedSubscriptSelector() const
Returns selector for "objectAtIndexedSubscript:".
Optional< NSNumberLiteralMethodKind > getNSNumberFactoryMethodKind(QualType T) const
Determine the appropriate NSNumber factory method kind for a literal of the given type...
Smart pointer class that efficiently represents Objective-C method names.
A (possibly-)qualified type.
Selector getNewSelector() const
Optional< NSDictionaryMethodKind > getNSDictionaryMethodKind(Selector Sel)
Return NSDictionaryMethodKind if Sel is such a selector.
NSNumberLiteralMethodKind
Enumerates the NSNumber methods used to generate literals.
Selector getIsEqualSelector() const
Returns selector for "isEqual:".
NSDictionaryMethodKind
Enumerates the NSDictionary/NSMutableDictionary methods used to generate literals and to apply some c...
One of these records is kept for each identifier that is lexed.
Selector getSetObjectForKeyedSubscriptSelector() const
Returns selector for "setObject:forKeyedSubscript".
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 ...
Selector getNSStringSelector(NSStringMethodKind MK) const
The Objective-C NSString selectors.
Selector getNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, bool Instance) const
The Objective-C NSNumber selectors used to create NSNumber literals.
Optional< NSNumberLiteralMethodKind > getNSNumberLiteralMethodKind(Selector Sel) const
Return NSNumberLiteralMethodKind if Sel is such a selector.
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
NSArrayMethodKind
Enumerates the NSArray/NSMutableArray methods used to generate literals and to apply some checks...
This represents one expression.
Selector getNSArraySelector(NSArrayMethodKind MK) const
The Objective-C NSArray selectors.
ASTContext & getASTContext() const
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
StringRef GetNSIntegralKind(QualType T) const
Returns one of NSIntegral typedef names if.
bool isNSUTF8StringEncodingConstant(const Expr *E) const
Returns true if the expression.
bool isObjCBOOLType(QualType T) const
Returns true if.
bool isObjCNSUIntegerType(QualType T) const
Returns true if.
Selector getNSSetSelector(NSSetMethodKind MK) const
The Objective-C NSSet selectors.
bool isObjCNSIntegerType(QualType T) const
Returns true if.
bool isSubclassOfNSClass(ObjCInterfaceDecl *InterfaceDecl, NSClassIdKindKind NSClassKind) const
Returns true if InterfaceDecl is subclass of NSClassKind.
IdentifierInfo * getNSClassId(NSClassIdKindKind K) const
Selector getInitSelector() const
Optional< NSStringMethodKind > getNSStringMethodKind(Selector Sel) const
Return NSStringMethodKind if.
Dataflow Directional Tag Classes.
bool isMacroDefined(StringRef Id) const
Returns true if Id is currently defined as a macro.
bool isNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, Selector Sel) const
static const unsigned NumNSArrayMethods
Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const
The Objective-C NSDictionary selectors.
static const unsigned NumNSDictionaryMethods
Optional< NSArrayMethodKind > getNSArrayMethodKind(Selector Sel)
Return NSArrayMethodKind if Sel is such a selector.
Selector getObjectForKeyedSubscriptSelector() const
Returns selector for "objectForKeyedSubscript:".
static const unsigned NumNSStringMethods
bool isNSASCIIStringEncodingConstant(const Expr *E) const
Returns true if the expression.
Selector getSetObjectAtIndexedSubscriptSelector() const
Returns selector for "setObject:atIndexedSubscript".