clang 8.0.0

Public Types | Public Member Functions | Static Public Attributes | List of all members
clang::NSAPI Class Reference

`#include "clang/AST/NSAPI.h"`

Collaboration diagram for clang::NSAPI:
[legend]

## Public Types
enum | NSClassIdKindKind { ClassId_NSObject, ClassId_NSString, ClassId_NSArray, ClassId_NSMutableArray, ClassId_NSDictionary, ClassId_NSMutableDictionary, ClassId_NSNumber, ClassId_NSMutableSet, ClassId_NSMutableOrderedSet, ClassId_NSValue }
enum | NSStringMethodKind { NSStr_stringWithString, NSStr_stringWithUTF8String, NSStr_stringWithCStringEncoding, NSStr_stringWithCString, NSStr_initWithString, NSStr_initWithUTF8String }
enum | NSArrayMethodKind { NSArr_array, NSArr_arrayWithArray, NSArr_arrayWithObject, NSArr_arrayWithObjects, NSArr_arrayWithObjectsCount, NSArr_initWithArray, NSArr_initWithObjects, NSArr_objectAtIndex, NSMutableArr_replaceObjectAtIndex, NSMutableArr_addObject, NSMutableArr_insertObjectAtIndex, NSMutableArr_setObjectAtIndexedSubscript }
| Enumerates the NSArray/NSMutableArray methods used to generate literals and to apply some checks. More...
enum | NSDictionaryMethodKind { NSDict_dictionary, NSDict_dictionaryWithDictionary, NSDict_dictionaryWithObjectForKey, NSDict_dictionaryWithObjectsForKeys, NSDict_dictionaryWithObjectsForKeysCount, NSDict_dictionaryWithObjectsAndKeys, NSDict_initWithDictionary, NSDict_initWithObjectsAndKeys, NSDict_initWithObjectsForKeys, NSDict_objectForKey, NSMutableDict_setObjectForKey, NSMutableDict_setObjectForKeyedSubscript, NSMutableDict_setValueForKey }
| Enumerates the NSDictionary/NSMutableDictionary methods used to generate literals and to apply some checks. More...
enum | NSSetMethodKind { NSMutableSet_addObject, NSOrderedSet_insertObjectAtIndex, NSOrderedSet_setObjectAtIndex, NSOrderedSet_setObjectAtIndexedSubscript, NSOrderedSet_replaceObjectAtIndexWithObject }
| Enumerates the NSMutableSet/NSOrderedSet methods used to apply some checks. More...
enum | NSNumberLiteralMethodKind { NSNumberWithChar, NSNumberWithUnsignedChar, NSNumberWithShort, NSNumberWithUnsignedShort, NSNumberWithInt, NSNumberWithUnsignedInt, NSNumberWithLong, NSNumberWithUnsignedLong, NSNumberWithLongLong, NSNumberWithUnsignedLongLong, NSNumberWithFloat, NSNumberWithDouble, NSNumberWithBool, NSNumberWithInteger, NSNumberWithUnsignedInteger }
| Enumerates the NSNumber methods used to generate literals. More...

## Public Member Functions
| NSAPI (ASTContext &Ctx)
ASTContext & | getASTContext () const
IdentifierInfo * | getNSClassId (NSClassIdKindKind K) const
Selector | getNSStringSelector (NSStringMethodKind MK) const
| The Objective-C NSString selectors. More...
Optional< NSStringMethodKind > | getNSStringMethodKind (Selector Sel) const
| Return NSStringMethodKind if. More...
bool | isNSUTF8StringEncodingConstant (const Expr *E) const
| Returns true if the expression. More...
bool | isNSASCIIStringEncodingConstant (const Expr *E) const
| Returns true if the expression. More...
Selector | getNSArraySelector (NSArrayMethodKind MK) const
| The Objective-C NSArray selectors. More...
Optional< NSArrayMethodKind > | getNSArrayMethodKind (Selector Sel)
| Return NSArrayMethodKind if `Sel` is such a selector. More...
Selector | getNSDictionarySelector (NSDictionaryMethodKind MK) const
| The Objective-C NSDictionary selectors. More...
Optional< NSDictionaryMethodKind > | getNSDictionaryMethodKind (Selector Sel)
| Return NSDictionaryMethodKind if `Sel` is such a selector. More...
Selector | getNSSetSelector (NSSetMethodKind MK) const
| The Objective-C NSSet selectors. More...
Optional< NSSetMethodKind > | getNSSetMethodKind (Selector Sel)
| Return NSSetMethodKind if `Sel` is such a selector. More...
Selector | getObjectForKeyedSubscriptSelector () const
| Returns selector for "objectForKeyedSubscript:". More...
Selector | getObjectAtIndexedSubscriptSelector () const
| Returns selector for "objectAtIndexedSubscript:". More...
Selector | getSetObjectForKeyedSubscriptSelector () const
| Returns selector for "setObject:forKeyedSubscript". More...
Selector | getSetObjectAtIndexedSubscriptSelector () const
| Returns selector for "setObject:atIndexedSubscript". More...
Selector | getIsEqualSelector () const
| Returns selector for "isEqual:". More...
Selector | getNewSelector () const
Selector | getInitSelector () const
Selector | getNSNumberLiteralSelector (NSNumberLiteralMethodKind MK, bool Instance) const
| The Objective-C NSNumber selectors used to create NSNumber literals. More...
bool | isNSNumberLiteralSelector (NSNumberLiteralMethodKind MK, Selector Sel) const
Optional< NSNumberLiteralMethodKind > | getNSNumberLiteralMethodKind (Selector Sel) const
| Return NSNumberLiteralMethodKind if `Sel` is such a selector. More...
Optional< NSNumberLiteralMethodKind > | getNSNumberFactoryMethodKind (QualType T) const
| Determine the appropriate NSNumber factory method kind for a literal of the given type. More...
bool | isObjCBOOLType (QualType T) const
| Returns true if. More...
bool | isObjCNSIntegerType (QualType T) const
| Returns true if. More...
bool | isObjCNSUIntegerType (QualType T) const
| Returns true if. More...
StringRef | GetNSIntegralKind (QualType T) const
| Returns one of NSIntegral typedef names if. More...
bool | isMacroDefined (StringRef Id) const
| Returns `true` if `Id` is currently defined as a macro. More...
bool | isSubclassOfNSClass (ObjCInterfaceDecl *InterfaceDecl, NSClassIdKindKind NSClassKind) const
| Returns `true` if `InterfaceDecl` is subclass of `NSClassKind`. More...

## Static Public Attributes
static const unsigned | NumClassIds = 10
static const unsigned | NumNSStringMethods = 6
static const unsigned | NumNSArrayMethods = 12
static const unsigned | NumNSDictionaryMethods = 13
static const unsigned | NumNSSetMethods = 5
static const unsigned | NumNSNumberLiteralMethods = 15

## Detailed Description

Definition at line 24 of file NSAPI.h.

## Member Enumeration Documentation

## ◆ NSArrayMethodKind

enum clang::NSAPI::NSArrayMethodKind

Enumerates the NSArray/NSMutableArray methods used to generate literals and to apply some checks.

Enumerator
NSArr_array |
NSArr_arrayWithArray |
NSArr_arrayWithObject |
NSArr_arrayWithObjects |
NSArr_arrayWithObjectsCount |
NSArr_initWithArray |
NSArr_initWithObjects |
NSArr_objectAtIndex |
NSMutableArr_replaceObjectAtIndex |
NSMutableArr_addObject |
NSMutableArr_insertObjectAtIndex |
NSMutableArr_setObjectAtIndexedSubscript |

Definition at line 76 of file NSAPI.h.

## ◆ NSClassIdKindKind

enum clang::NSAPI::NSClassIdKindKind

Enumerator
ClassId_NSObject |
ClassId_NSString |
ClassId_NSArray |
ClassId_NSMutableArray |
ClassId_NSDictionary |
ClassId_NSMutableDictionary |
ClassId_NSNumber |
ClassId_NSMutableSet |
ClassId_NSMutableOrderedSet |
ClassId_NSValue |

Definition at line 30 of file NSAPI.h.

## ◆ NSDictionaryMethodKind

enum clang::NSAPI::NSDictionaryMethodKind

Enumerates the NSDictionary/NSMutableDictionary methods used to generate literals and to apply some checks.

Enumerator
NSDict_dictionary |
NSDict_dictionaryWithDictionary |
NSDict_dictionaryWithObjectForKey |
NSDict_dictionaryWithObjectsForKeys |
NSDict_dictionaryWithObjectsForKeysCount |
NSDict_dictionaryWithObjectsAndKeys |
NSDict_initWithDictionary |
NSDict_initWithObjectsAndKeys |
NSDict_initWithObjectsForKeys |
NSDict_objectForKey |
NSMutableDict_setObjectForKey |
NSMutableDict_setObjectForKeyedSubscript |
NSMutableDict_setValueForKey |

Definition at line 100 of file NSAPI.h.

## ◆ NSNumberLiteralMethodKind

enum clang::NSAPI::NSNumberLiteralMethodKind

Enumerates the NSNumber methods used to generate literals.

Enumerator
NSNumberWithChar |
NSNumberWithUnsignedChar |
NSNumberWithShort |
NSNumberWithUnsignedShort |
NSNumberWithInt |
NSNumberWithUnsignedInt |
NSNumberWithLong |
NSNumberWithUnsignedLong |
NSNumberWithLongLong |
NSNumberWithUnsignedLongLong |
NSNumberWithFloat |
NSNumberWithDouble |
NSNumberWithBool |
NSNumberWithInteger |
NSNumberWithUnsignedInteger |

Definition at line 178 of file NSAPI.h.

## ◆ NSSetMethodKind

enum clang::NSAPI::NSSetMethodKind

Enumerates the NSMutableSet/NSOrderedSet methods used to apply some checks.

Enumerator
NSMutableSet_addObject |
NSOrderedSet_insertObjectAtIndex |
NSOrderedSet_setObjectAtIndex |
NSOrderedSet_setObjectAtIndexedSubscript |
NSOrderedSet_replaceObjectAtIndexWithObject |

Definition at line 125 of file NSAPI.h.

## ◆ NSStringMethodKind

enum clang::NSAPI::NSStringMethodKind

Enumerator
NSStr_stringWithString |
NSStr_stringWithUTF8String |
NSStr_stringWithCStringEncoding |
NSStr_stringWithCString |
NSStr_initWithString |
NSStr_initWithUTF8String |

Definition at line 44 of file NSAPI.h.

## Constructor & Destructor Documentation

## ◆ NSAPI()

NSAPI::NSAPI | ( | ASTContext & | Ctx | ) |
| explicit

Definition at line 18 of file NSAPI.cpp.

## Member Function Documentation

## ◆ getASTContext()

ASTContext& clang::NSAPI::getASTContext | ( |  | ) | const
| inline

Definition at line 28 of file NSAPI.h.

Referenced by doRewriteToUTF8StringBoxedExpressionHelper(), getNSArrayObjects(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToArrayLiteral(), rewriteToArraySubscriptGet(), rewriteToArraySubscriptSet(), rewriteToDictionaryLiteral(), rewriteToDictionarySubscriptGet(), rewriteToDictionarySubscriptSet(), rewriteToNSEnumDecl(), rewriteToNumberLiteral(), rewriteToNumericBoxedExpression(), clang::edit::rewriteToObjCLiteralSyntax(), rewriteToObjCProperty(), clang::edit::rewriteToObjCSubscriptSyntax(), and shouldNotRewriteImmediateMessageArgs().

## ◆ getInitSelector()

Selector clang::NSAPI::getInitSelector | ( |  | ) | const
| inline

Definition at line 173 of file NSAPI.h.

## ◆ getIsEqualSelector()

Selector clang::NSAPI::getIsEqualSelector | ( |  | ) | const
| inline

Returns selector for "isEqual:".

Definition at line 165 of file NSAPI.h.

## ◆ getNewSelector()

Selector clang::NSAPI::getNewSelector | ( |  | ) | const
| inline

Definition at line 169 of file NSAPI.h.

## ◆ getNSArrayMethodKind()

Optional< NSAPI::NSArrayMethodKind > NSAPI::getNSArrayMethodKind | ( | Selector | Sel | ) |

Return NSArrayMethodKind if `Sel` is such a selector.

Definition at line 157 of file NSAPI.cpp.

References getNSArraySelector(), clang::None, and NumNSArrayMethods.

## ◆ getNSArraySelector()

Selector NSAPI::getNSArraySelector | ( | NSArrayMethodKind | MK | ) | const

The Objective-C NSArray selectors.

Definition at line 90 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::SelectorTable::getNullarySelector(), clang::SelectorTable::getSelector(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NSArr_array, NSArr_arrayWithArray, NSArr_arrayWithObject, NSArr_arrayWithObjects, NSArr_arrayWithObjectsCount, NSArr_initWithArray, NSArr_initWithObjects, NSArr_objectAtIndex, NSMutableArr_addObject, NSMutableArr_insertObjectAtIndex, NSMutableArr_replaceObjectAtIndex, NSMutableArr_setObjectAtIndexedSubscript, and clang::ASTContext::Selectors.

Referenced by getNSArrayMethodKind(), getNSArrayObjects(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToArrayLiteral(), and clang::edit::rewriteToObjCSubscriptSyntax().

## ◆ getNSClassId()

IdentifierInfo * NSAPI::getNSClassId | ( | NSClassIdKindKind | K | ) | const

Definition at line 23 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::ASTContext::Idents, and NumClassIds.

Referenced by getNSArrayObjects(), isSubclassOfNSClass(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::edit::rewriteToObjCLiteralSyntax(), and shouldNotRewriteImmediateMessageArgs().

## ◆ getNSDictionaryMethodKind()

Optional< NSAPI::NSDictionaryMethodKind > NSAPI::getNSDictionaryMethodKind | ( | Selector | Sel | ) |

Return NSDictionaryMethodKind if `Sel` is such a selector.

Definition at line 259 of file NSAPI.cpp.

References getNSDictionarySelector(), clang::None, and NumNSDictionaryMethods.

## ◆ getNSDictionarySelector()

Selector NSAPI::getNSDictionarySelector | ( | NSDictionaryMethodKind | MK | ) | const

The Objective-C NSDictionary selectors.

Definition at line 167 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::SelectorTable::getNullarySelector(), clang::SelectorTable::getSelector(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NSDict_dictionary, NSDict_dictionaryWithDictionary, NSDict_dictionaryWithObjectForKey, NSDict_dictionaryWithObjectsAndKeys, NSDict_dictionaryWithObjectsForKeys, NSDict_dictionaryWithObjectsForKeysCount, NSDict_initWithDictionary, NSDict_initWithObjectsAndKeys, NSDict_initWithObjectsForKeys, NSDict_objectForKey, NSMutableDict_setObjectForKey, NSMutableDict_setObjectForKeyedSubscript, NSMutableDict_setValueForKey, and clang::ASTContext::Selectors.

Referenced by getNSDictionaryMethodKind(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToDictionaryLiteral(), clang::edit::rewriteToObjCSubscriptSyntax(), and shouldNotRewriteImmediateMessageArgs().

## ◆ GetNSIntegralKind()

StringRef NSAPI::GetNSIntegralKind | ( | QualType | T | ) | const

Returns one of NSIntegral typedef names if.

Parameters

  T | is a typedef of that name in objective-c.

Definition at line 514 of file NSAPI.cpp.

References clang::Type::getAs(), clang::ASTContext::getLangOpts(), and clang::QualType::isNull().

Referenced by isNSNumberLiteralSelector().

## ◆ getNSNumberFactoryMethodKind()

Optional< NSAPI::NSNumberLiteralMethodKind > NSAPI::getNSNumberFactoryMethodKind | ( | QualType | T | ) | const

Determine the appropriate NSNumber factory method kind for a literal of the given type.

Definition at line 390 of file NSAPI.cpp.

References clang::Type::getAs(), clang::BuiltinType::getKind(), isObjCBOOLType(), isObjCNSIntegerType(), isObjCNSUIntegerType(), clang::None, NSNumberWithBool, NSNumberWithChar, NSNumberWithDouble, NSNumberWithFloat, NSNumberWithInt, NSNumberWithInteger, NSNumberWithLong, NSNumberWithLongLong, NSNumberWithShort, NSNumberWithUnsignedChar, NSNumberWithUnsignedInt, NSNumberWithUnsignedInteger, NSNumberWithUnsignedLong, NSNumberWithUnsignedLongLong, and NSNumberWithUnsignedShort.

Referenced by isNSNumberLiteralSelector().

## ◆ getNSNumberLiteralMethodKind()

Optional< NSAPI::NSNumberLiteralMethodKind > NSAPI::getNSNumberLiteralMethodKind | ( | Selector | Sel | ) | const

Return NSNumberLiteralMethodKind if `Sel` is such a selector.

Definition at line 379 of file NSAPI.cpp.

References isNSNumberLiteralSelector(), clang::None, and NumNSNumberLiteralMethods.

Referenced by isNSNumberLiteralSelector(), rewriteToNumberLiteral(), and rewriteToNumericBoxedExpression().

## ◆ getNSNumberLiteralSelector()

Selector NSAPI::getNSNumberLiteralSelector | ( | NSNumberLiteralMethodKind | MK,
|  | bool | Instance
| ) |  | const

The Objective-C NSNumber selectors used to create NSNumber literals.

Parameters

  Instance | if true it will return the selector for the init* method otherwise it will return the selector for the number* method.

Definition at line 326 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NumNSNumberLiteralMethods, and clang::ASTContext::Selectors.

Referenced by isNSNumberLiteralSelector().

## ◆ getNSSetMethodKind()

Optional< NSAPI::NSSetMethodKind > NSAPI::getNSSetMethodKind | ( | Selector | Sel | ) |

Return NSSetMethodKind if `Sel` is such a selector.

Definition at line 316 of file NSAPI.cpp.

References getNSSetSelector(), clang::None, and NumNSSetMethods.

## ◆ getNSSetSelector()

Selector NSAPI::getNSSetSelector | ( | NSSetMethodKind | MK | ) | const

The Objective-C NSSet selectors.

Definition at line 269 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::SelectorTable::getSelector(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NSMutableSet_addObject, NSOrderedSet_insertObjectAtIndex, NSOrderedSet_replaceObjectAtIndexWithObject, NSOrderedSet_setObjectAtIndex, NSOrderedSet_setObjectAtIndexedSubscript, and clang::ASTContext::Selectors.

Referenced by getNSSetMethodKind().

## ◆ getNSStringMethodKind()

Optional< NSAPI::NSStringMethodKind > NSAPI::getNSStringMethodKind | ( | Selector | Sel | ) | const

Return NSStringMethodKind if.

Parameters

  Sel | is such a selector.

Definition at line 80 of file NSAPI.cpp.

References getNSStringSelector(), clang::None, and NumNSStringMethods.

## ◆ getNSStringSelector()

Selector NSAPI::getNSStringSelector | ( | NSStringMethodKind | MK | ) | const

The Objective-C NSString selectors.

Definition at line 43 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::SelectorTable::getSelector(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NSStr_initWithString, NSStr_initWithUTF8String, NSStr_stringWithCString, NSStr_stringWithCStringEncoding, NSStr_stringWithString, NSStr_stringWithUTF8String, and clang::ASTContext::Selectors.

Referenced by getNSStringMethodKind(), clang::edit::rewriteObjCRedundantCallWithLiteral(), and rewriteToStringBoxedExpression().

## ◆ getObjectAtIndexedSubscriptSelector()

Selector clang::NSAPI::getObjectAtIndexedSubscriptSelector | ( |  | ) | const
| inline

Returns selector for "objectAtIndexedSubscript:".

Definition at line 147 of file NSAPI.h.

Referenced by rewriteToArraySubscriptGet().

## ◆ getObjectForKeyedSubscriptSelector()

Selector clang::NSAPI::getObjectForKeyedSubscriptSelector | ( |  | ) | const
| inline

Returns selector for "objectForKeyedSubscript:".

Definition at line 141 of file NSAPI.h.

Referenced by rewriteToDictionarySubscriptGet().

## ◆ getSetObjectAtIndexedSubscriptSelector()

Selector clang::NSAPI::getSetObjectAtIndexedSubscriptSelector | ( |  | ) | const
| inline

Returns selector for "setObject:atIndexedSubscript".

Definition at line 159 of file NSAPI.h.

Referenced by rewriteToArraySubscriptSet().

## ◆ getSetObjectForKeyedSubscriptSelector()

Selector clang::NSAPI::getSetObjectForKeyedSubscriptSelector | ( |  | ) | const
| inline

Returns selector for "setObject:forKeyedSubscript".

Definition at line 153 of file NSAPI.h.

Referenced by rewriteToDictionarySubscriptSet().

## ◆ isMacroDefined()

bool NSAPI::isMacroDefined | ( | StringRef | Id | ) | const

Returns `true` if `Id` is currently defined as a macro.

Definition at line 540 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::IdentifierInfo::hasMacroDefinition(), and clang::ASTContext::Idents.

Referenced by isNSNumberLiteralSelector(), and rewriteToObjCProperty().

## ◆ isNSASCIIStringEncodingConstant()

bool clang::NSAPI::isNSASCIIStringEncodingConstant | ( | const Expr * | E | ) | const
| inline

Returns true if the expression.

Parameters

  E | is a reference of "NSASCIIStringEncoding" enum constant.

Definition at line 70 of file NSAPI.h.

Referenced by rewriteToStringBoxedExpression().

## ◆ isNSNumberLiteralSelector()

bool clang::NSAPI::isNSNumberLiteralSelector | ( | NSNumberLiteralMethodKind | MK,
|  | Selector | Sel
| ) |  | const
| inline

Definition at line 203 of file NSAPI.h.

References GetNSIntegralKind(), getNSNumberFactoryMethodKind(), getNSNumberLiteralMethodKind(), getNSNumberLiteralSelector(), Id, isMacroDefined(), isObjCBOOLType(), isObjCNSIntegerType(), isObjCNSUIntegerType(), isSubclassOfNSClass(), NumClassIds, NumNSArrayMethods, NumNSDictionaryMethods, NumNSNumberLiteralMethods, NumNSSetMethods, and NumNSStringMethods.

Referenced by getNSNumberLiteralMethodKind(), rewriteToBoolLiteral(), and rewriteToCharLiteral().

## ◆ isNSUTF8StringEncodingConstant()

bool clang::NSAPI::isNSUTF8StringEncodingConstant | ( | const Expr * | E | ) | const
| inline

Returns true if the expression.

Parameters

  E | is a reference of "NSUTF8StringEncoding" enum constant.

Definition at line 64 of file NSAPI.h.

Referenced by rewriteToStringBoxedExpression().

## ◆ isObjCBOOLType()

bool NSAPI::isObjCBOOLType | ( | QualType | T | ) | const

Returns true if.

Parameters

  T | is a typedef of "BOOL" in objective-c.

Definition at line 502 of file NSAPI.cpp.

Referenced by getNSNumberFactoryMethodKind(), and isNSNumberLiteralSelector().

## ◆ isObjCNSIntegerType()

bool NSAPI::isObjCNSIntegerType | ( | QualType | T | ) | const

Returns true if.

Parameters

  T | is a typedef of "NSInteger" in objective-c.

Definition at line 506 of file NSAPI.cpp.

Referenced by getNSNumberFactoryMethodKind(), and isNSNumberLiteralSelector().

## ◆ isObjCNSUIntegerType()

bool NSAPI::isObjCNSUIntegerType | ( | QualType | T | ) | const

Returns true if.

Parameters

  T | is a typedef of "NSUInteger" in objective-c.

Definition at line 510 of file NSAPI.cpp.

Referenced by getNSNumberFactoryMethodKind(), and isNSNumberLiteralSelector().

## ◆ isSubclassOfNSClass()

bool NSAPI::isSubclassOfNSClass | ( | ObjCInterfaceDecl * | InterfaceDecl,
|  | NSClassIdKindKind | NSClassKind
| ) |  | const

Returns `true` if `InterfaceDecl` is subclass of `NSClassKind`.

Definition at line 545 of file NSAPI.cpp.

References clang::IdentifierTable::get(), clang::Type::getAs(), clang::NamedDecl::getIdentifier(), clang::ASTContext::getLangOpts(), getNSClassId(), clang::SelectorTable::getSelector(), clang::ObjCInterfaceDecl::getSuperClass(), Id, clang::ASTContext::Idents, clang::Expr::IgnoreParenImpCasts(), clang::QualType::isNull(), clang::Selector::isNull(), and clang::ASTContext::Selectors.

Referenced by isNSNumberLiteralSelector().

## Member Data Documentation

## ◆ NumClassIds

const unsigned clang::NSAPI::NumClassIds = 10
| static

Definition at line 42 of file NSAPI.h.

Referenced by getNSClassId(), and isNSNumberLiteralSelector().

## ◆ NumNSArrayMethods

const unsigned clang::NSAPI::NumNSArrayMethods = 12
| static

Definition at line 90 of file NSAPI.h.

Referenced by getNSArrayMethodKind(), and isNSNumberLiteralSelector().

## ◆ NumNSDictionaryMethods

const unsigned clang::NSAPI::NumNSDictionaryMethods = 13
| static

Definition at line 115 of file NSAPI.h.

Referenced by getNSDictionaryMethodKind(), and isNSNumberLiteralSelector().

## ◆ NumNSNumberLiteralMethods

const unsigned clang::NSAPI::NumNSNumberLiteralMethods = 15
| static

Definition at line 195 of file NSAPI.h.

Referenced by getNSNumberLiteralMethodKind(), getNSNumberLiteralSelector(), and isNSNumberLiteralSelector().

## ◆ NumNSSetMethods

const unsigned clang::NSAPI::NumNSSetMethods = 5
| static

Definition at line 132 of file NSAPI.h.

Referenced by getNSSetMethodKind(), and isNSNumberLiteralSelector().

## ◆ NumNSStringMethods

const unsigned clang::NSAPI::NumNSStringMethods = 6
| static

Definition at line 52 of file NSAPI.h.

Referenced by getNSStringMethodKind(), and isNSNumberLiteralSelector().

The documentation for this class was generated from the following files:

- include/clang/AST/NSAPI.h
- lib/AST/NSAPI.cpp