;
19: Ctx(ctx), ClassIds(), BOOLId(nullptr), NSIntegerId(nullptr),
20NSUIntegerId(nullptr), NSASCIIStringEncodingId(nullptr),
21NSUTF8StringEncodingId(nullptr) {}
30 "NSMutableDictionary",
33 "NSMutableOrderedSet",
38 return(ClassIds[K] = &Ctx.
Idents.
get(ClassName[K]));
44 if(NSStringSelectors[MK].isNull()) {
52&Ctx.
Idents.
get(
"stringWithUTF8String"));
56&Ctx.
Idents.
get(
"initWithUTF8String"));
71 return(NSStringSelectors[MK] = Sel);
74 returnNSStringSelectors[MK];
78 if(NSArraySelectors[MK].isNull()) {
110&Ctx.
Idents.
get(
"replaceObjectAtIndex"),
131 return(NSArraySelectors[MK] = Sel);
134 returnNSArraySelectors[MK];
137std::optional<NSAPI::NSArrayMethodKind>
150 if(NSDictionarySelectors[MK].isNull()) {
158&Ctx.
Idents.
get(
"dictionaryWithDictionary"));
181&Ctx.
Idents.
get(
"dictionaryWithObjectsAndKeys"));
185&Ctx.
Idents.
get(
"initWithDictionary"));
189&Ctx.
Idents.
get(
"initWithObjectsAndKeys"));
219 return(NSDictionarySelectors[MK] = Sel);
222 returnNSDictionarySelectors[MK];
225std::optional<NSAPI::NSDictionaryMethodKind>
237 if(NSSetSelectors[MK].isNull()) {
263&Ctx.
Idents.
get(
"replaceObjectAtIndex"),
269 return(NSSetSelectors[MK] = Sel);
272 returnNSSetSelectors[MK];
286 boolInstance)
const{
289 "numberWithUnsignedChar",
291 "numberWithUnsignedShort",
293 "numberWithUnsignedInt",
295 "numberWithUnsignedLong",
296 "numberWithLongLong",
297 "numberWithUnsignedLongLong",
301 "numberWithInteger",
302 "numberWithUnsignedInteger" 306 "initWithUnsignedChar",
308 "initWithUnsignedShort",
310 "initWithUnsignedInt",
312 "initWithUnsignedLong",
314 "initWithUnsignedLongLong",
319 "initWithUnsignedInteger" 325Sels = NSNumberInstanceSelectors;
326Names = InstanceSelectorName;
328Sels = NSNumberClassSelectors;
329Names = ClassSelectorName;
332 if(Sels[MK].isNull())
337std::optional<NSAPI::NSNumberLiteralMethodKind>
348std::optional<NSAPI::NSNumberLiteralMethodKind>
366 caseBuiltinType::Char_S:
367 caseBuiltinType::SChar:
369 caseBuiltinType::Char_U:
370 caseBuiltinType::UChar:
372 caseBuiltinType::Short:
374 caseBuiltinType::UShort:
376 caseBuiltinType::Int:
378 caseBuiltinType::UInt:
380 caseBuiltinType::Long:
382 caseBuiltinType::ULong:
384 caseBuiltinType::LongLong:
386 caseBuiltinType::ULongLong:
388 caseBuiltinType::Float:
390 caseBuiltinType::Double:
392 caseBuiltinType::Bool:
395 caseBuiltinType::Void:
396 caseBuiltinType::WChar_U:
397 caseBuiltinType::WChar_S:
398 caseBuiltinType::Char8:
399 caseBuiltinType::Char16:
400 caseBuiltinType::Char32:
401 caseBuiltinType::Int128:
402 caseBuiltinType::LongDouble:
403 caseBuiltinType::ShortAccum:
404 caseBuiltinType::Accum:
405 caseBuiltinType::LongAccum:
406 caseBuiltinType::UShortAccum:
407 caseBuiltinType::UAccum:
408 caseBuiltinType::ULongAccum:
409 caseBuiltinType::ShortFract:
410 caseBuiltinType::Fract:
411 caseBuiltinType::LongFract:
412 caseBuiltinType::UShortFract:
413 caseBuiltinType::UFract:
414 caseBuiltinType::ULongFract:
415 caseBuiltinType::SatShortAccum:
416 caseBuiltinType::SatAccum:
417 caseBuiltinType::SatLongAccum:
418 caseBuiltinType::SatUShortAccum:
419 caseBuiltinType::SatUAccum:
420 caseBuiltinType::SatULongAccum:
421 caseBuiltinType::SatShortFract:
422 caseBuiltinType::SatFract:
423 caseBuiltinType::SatLongFract:
424 caseBuiltinType::SatUShortFract:
425 caseBuiltinType::SatUFract:
426 caseBuiltinType::SatULongFract:
427 caseBuiltinType::UInt128:
428 caseBuiltinType::Float16:
429 caseBuiltinType::Float128:
430 caseBuiltinType::Ibm128:
431 caseBuiltinType::NullPtr:
432 caseBuiltinType::ObjCClass:
433 caseBuiltinType::ObjCId:
434 caseBuiltinType::ObjCSel:
435#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ 436 case BuiltinType::Id: 437#include "clang/Basic/OpenCLImageTypes.def" 438#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \ 439 case BuiltinType::Id: 440#include "clang/Basic/OpenCLExtensionTypes.def" 441 caseBuiltinType::OCLSampler:
442 caseBuiltinType::OCLEvent:
443 caseBuiltinType::OCLClkEvent:
444 caseBuiltinType::OCLQueue:
445 caseBuiltinType::OCLReserveID:
446#define SVE_TYPE(Name, Id, SingletonId) \ 447 case BuiltinType::Id: 448#include "clang/Basic/AArch64SVEACLETypes.def" 449#define PPC_VECTOR_TYPE(Name, Id, Size) \ 450 case BuiltinType::Id: 451#include "clang/Basic/PPCTypes.def" 452#define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id: 453#include "clang/Basic/RISCVVTypes.def" 454#define WASM_TYPE(Name, Id, SingletonId) case BuiltinType::Id: 455#include "clang/Basic/WebAssemblyReferenceTypes.def" 456#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) case BuiltinType::Id: 457#include "clang/Basic/AMDGPUTypes.def" 458#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id: 459#include "clang/Basic/HLSLIntangibleTypes.def" 460 caseBuiltinType::BoundMember:
461 caseBuiltinType::UnresolvedTemplate:
462 caseBuiltinType::Dependent:
463 caseBuiltinType::Overload:
464 caseBuiltinType::UnknownAny:
465 caseBuiltinType::ARCUnbridgedCast:
466 caseBuiltinType::Half:
467 caseBuiltinType::PseudoObject:
468 caseBuiltinType::BuiltinFn:
469 caseBuiltinType::IncompleteMatrixIdx:
470 caseBuiltinType::ArraySection:
471 caseBuiltinType::OMPArrayShaping:
472 caseBuiltinType::OMPIterator:
473 caseBuiltinType::BFloat16:
482 returnisObjCTypedef(
T,
"BOOL", BOOLId);
486 returnisObjCTypedef(
T,
"NSInteger", NSIntegerId);
490 returnisObjCTypedef(
T,
"NSUInteger", NSUIntegerId);
498StringRef NSIntegralResust =
499llvm::StringSwitch<StringRef>(
500TDT->getDecl()->getDeclName().getAsIdentifierInfo()->getName())
501.Case(
"int8_t",
"int8_t")
502.Case(
"int16_t",
"int16_t")
503.Case(
"int32_t",
"int32_t")
504.Case(
"NSInteger",
"NSInteger")
505.Case(
"int64_t",
"int64_t")
506.Case(
"uint8_t",
"uint8_t")
507.Case(
"uint16_t",
"uint16_t")
508.Case(
"uint32_t",
"uint32_t")
509.Case(
"NSUInteger",
"NSUInteger")
510.Case(
"uint64_t",
"uint64_t")
511.Default(StringRef());
512 if(!NSIntegralResust.empty())
513 returnNSIntegralResust;
526 if(!InterfaceDecl) {
532 boolIsSubclass =
false;
539}
while((InterfaceDecl = InterfaceDecl->
getSuperClass()));
555 if(TDT->getDecl()->getDeclName().getAsIdentifierInfo() == II)
563boolNSAPI::isObjCEnumerator(
const Expr*
E,
575EnumD = dyn_cast_or_null<EnumConstantDecl>(DRE->getDecl()))
576 returnEnumD->getIdentifier() == II;
586I = Ids.begin(),
E= Ids.end(); I !=
E; ++I)
587Idents.push_back(&Ctx.
Idents.
get(*I));
Defines the clang::ASTContext interface.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
const LangOptions & getLangOpts() const
SelectorTable & Selectors
This class is used for builtin types like 'int'.
A reference to a declared variable, function, enum, etc.
An instance of this object exists for each enum constant that is defined.
This represents one expression.
Expr * IgnoreParenImpCasts() LLVM_READONLY
Skip past any parentheses and implicit casts which might surround this expression until reaching a fi...
One of these records is kept for each identifier that is lexed.
bool hasMacroDefinition() const
Return true if this identifier is #defined to some other value.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
std::optional< NSNumberLiteralMethodKind > getNSNumberLiteralMethodKind(Selector Sel) const
Return NSNumberLiteralMethodKind if Sel is such a selector.
bool isObjCNSIntegerType(QualType T) const
Returns true if.
@ NSStr_initWithUTF8String
@ NSStr_stringWithCString
@ NSStr_stringWithCStringEncoding
@ NSStr_stringWithUTF8String
Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const
The Objective-C NSDictionary selectors.
static const unsigned NumNSArrayMethods
Selector getNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, bool Instance) const
The Objective-C NSNumber selectors used to create NSNumber literals.
bool isMacroDefined(StringRef Id) const
Returns true if Id is currently defined as a macro.
std::optional< NSNumberLiteralMethodKind > getNSNumberFactoryMethodKind(QualType T) const
Determine the appropriate NSNumber factory method kind for a literal of the given type.
std::optional< NSDictionaryMethodKind > getNSDictionaryMethodKind(Selector Sel)
Return NSDictionaryMethodKind if Sel is such a selector.
static const unsigned NumClassIds
NSSetMethodKind
Enumerates the NSMutableSet/NSOrderedSet methods used to apply some checks.
@ NSOrderedSet_setObjectAtIndex
@ NSOrderedSet_replaceObjectAtIndexWithObject
@ NSOrderedSet_setObjectAtIndexedSubscript
@ NSOrderedSet_insertObjectAtIndex
NSDictionaryMethodKind
Enumerates the NSDictionary/NSMutableDictionary methods used to generate literals and to apply some c...
@ NSMutableDict_setValueForKey
@ NSDict_dictionaryWithObjectsForKeys
@ NSDict_dictionaryWithDictionary
@ NSMutableDict_setObjectForKey
@ NSDict_initWithObjectsForKeys
@ NSDict_dictionaryWithObjectForKey
@ NSDict_initWithDictionary
@ NSDict_dictionaryWithObjectsForKeysCount
@ NSDict_initWithObjectsAndKeys
@ NSMutableDict_setObjectForKeyedSubscript
@ NSDict_dictionaryWithObjectsAndKeys
Selector getNSArraySelector(NSArrayMethodKind MK) const
The Objective-C NSArray selectors.
std::optional< NSArrayMethodKind > getNSArrayMethodKind(Selector Sel)
Return NSArrayMethodKind if Sel is such a selector.
NSArrayMethodKind
Enumerates the NSArray/NSMutableArray methods used to generate literals and to apply some checks.
@ NSMutableArr_setObjectAtIndexedSubscript
@ NSMutableArr_insertObjectAtIndex
@ NSArr_arrayWithObjectsCount
@ NSMutableArr_replaceObjectAtIndex
bool isSubclassOfNSClass(ObjCInterfaceDecl *InterfaceDecl, NSClassIdKindKind NSClassKind) const
Returns true if InterfaceDecl is subclass of NSClassKind.
std::optional< NSSetMethodKind > getNSSetMethodKind(Selector Sel)
Return NSSetMethodKind if Sel is such a selector.
bool isNSNumberLiteralSelector(NSNumberLiteralMethodKind MK, Selector Sel) const
static const unsigned NumNSNumberLiteralMethods
bool isObjCNSUIntegerType(QualType T) const
Returns true if.
NSNumberLiteralMethodKind
Enumerates the NSNumber methods used to generate literals.
@ NSNumberWithUnsignedChar
@ NSNumberWithUnsignedLongLong
@ NSNumberWithUnsignedInt
@ NSNumberWithUnsignedLong
@ NSNumberWithUnsignedInteger
@ NSNumberWithUnsignedShort
Selector getNSStringSelector(NSStringMethodKind MK) const
The Objective-C NSString selectors.
static const unsigned NumNSDictionaryMethods
bool isObjCBOOLType(QualType T) const
Returns true if.
static const unsigned NumNSSetMethods
StringRef GetNSIntegralKind(QualType T) const
Returns one of NSIntegral typedef names if.
Selector getNSSetSelector(NSSetMethodKind MK) const
The Objective-C NSSet selectors.
IdentifierInfo * getNSClassId(NSClassIdKindKind K) const
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
Represents an ObjC class declaration.
ObjCInterfaceDecl * getSuperClass() const
A (possibly-)qualified type.
Selector getNullarySelector(const IdentifierInfo *ID)
Selector getSelector(unsigned NumArgs, const IdentifierInfo **IIV)
Can create any sort of selector.
Selector getUnarySelector(const IdentifierInfo *ID)
Smart pointer class that efficiently represents Objective-C method names.
bool isNull() const
Determine whether this is the empty selector.
const T * getAs() const
Member-template getAs<specific type>'.
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4