27 if (SuperD->getName() ==
"XCTestCase")
47 if (D->
hasAttr<IBOutletAttr>()) {
49 }
else if (D->
hasAttr<IBOutletCollectionAttr>()) {
69 if (
const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
70 switch (ND->getFormalLinkage()) {
72 llvm_unreachable(
"Linkage hasn't been computed!");
78 llvm_unreachable(
"Not a sema linkage");
90 switch (TD->getTagKind()) {
120 if (
auto *VT = dyn_cast<VarTemplateDecl>(D)) {
124 D = VT->getTemplatedDecl();
127 if (
const TagDecl *TD = dyn_cast<TagDecl>(D)) {
128 switch (TD->getTagKind()) {
145 if (
const CXXRecordDecl *CXXRec = dyn_cast<CXXRecordDecl>(D)) {
146 if (!CXXRec->isCLike()) {
148 if (CXXRec->getDescribedClassTemplate()) {
164 }
else if (
auto *VD = dyn_cast<VarDecl>(D)) {
183 }
else if (VD->getDescribedVarTemplate()) {
193 case Decl::Typedef: {
202 case Decl::IndirectField:
206 if (!CXXRec->isCLike())
210 case Decl::EnumConstant:
212 case Decl::ObjCInterface:
213 case Decl::ObjCImplementation: {
223 case Decl::ObjCProtocol:
227 case Decl::ObjCCategory:
228 case Decl::ObjCCategoryImpl: {
232 if (
auto *CatD = dyn_cast<ObjCCategoryDecl>(D))
233 ClsD = CatD->getClassInterface();
240 case Decl::ObjCMethod: {
252 if (D->
hasAttr<IBActionAttr>())
256 case Decl::ObjCProperty:
260 if (
auto *Annot = D->
getAttr<AnnotateAttr>()) {
261 if (Annot->getAnnotation() ==
"gk_inspectable")
270 case Decl::Namespace:
274 case Decl::NamespaceAlias:
278 case Decl::CXXConstructor: {
282 if (CD->isCopyConstructor())
284 else if (CD->isMoveConstructor())
288 case Decl::CXXDestructor:
292 case Decl::CXXConversion:
296 case Decl::CXXMethod: {
305 case Decl::ClassTemplate:
310 case Decl::FunctionTemplate:
314 if (
const CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(
330 case Decl::TypeAliasTemplate:
335 case Decl::TypeAlias: {
341 case Decl::UnresolvedUsingTypename:
347 case Decl::UnresolvedUsingValue:
357 case Decl::UsingEnum:
366 case Decl::MSProperty:
370 if (!CXXRec->isCLike())
374 case Decl::ClassTemplatePartialSpecialization:
375 case Decl::ClassTemplateSpecialization:
376 case Decl::CXXRecord:
379 llvm_unreachable(
"records handled before");
381 case Decl::VarTemplateSpecialization:
382 case Decl::VarTemplatePartialSpecialization:
383 case Decl::ImplicitParam:
386 case Decl::VarTemplate:
387 llvm_unreachable(
"variables handled before");
389 case Decl::TemplateTypeParm:
392 case Decl::TemplateTemplateParm:
395 case Decl::NonTypeTemplateParm:
410 if (
const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
411 if (FD->getTemplatedKind() ==
423 if (
attr->getLanguage() ==
"Swift")
441#define APPLY_FOR_ROLE(Role) \
442 if (Roles & (unsigned)SymbolRole::Role) \
443 if (!Fn(SymbolRole::Role)) \
482 bool VisitedOnce =
false;
516 if (
auto *ND = dyn_cast<NamedDecl>(D)) {
525 DeclName.
print(OS, Policy);
570 llvm_unreachable(
"invalid symbol kind");
581 return "using-typename";
583 return "using-value";
587 return "using-class";
589 return "using-struct";
591 llvm_unreachable(
"invalid symbol subkind");
601 llvm_unreachable(
"invalid symbol language kind");
606#define APPLY_FOR_PROPERTY(K) \
607 if (Props & (SymbolPropertySet)SymbolProperty::K) \
608 Fn(SymbolProperty::K)
620#undef APPLY_FOR_PROPERTY
624 bool VisitedOnce =
false;
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
#define APPLY_FOR_PROPERTY(K)
static bool isUnitTest(const ObjCMethodDecl *D)
static SymbolSubKind getSubKindForTypedef(const TypedefNameDecl *TND)
#define APPLY_FOR_ROLE(Role)
static void checkForIBOutlets(const Decl *D, SymbolPropertySet &PropSet)
static bool isUnitTestCase(const ObjCInterfaceDecl *D)
Defines the clang::MacroInfo and clang::MacroDirective classes.
C Language Family Type Representation.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
Decl - This represents one declaration (or definition), e.g.
const DeclContext * getParentFunctionOrMethod(bool LexicalParent=false) const
If this decl is defined inside a function/method/block it returns the corresponding DeclContext,...
ExternalSourceSymbolAttr * getExternalSourceSymbolAttr() const
Looks on this and related declarations for an applicable external source symbol attribute.
DeclContext * getDeclContext()
The name of a declaration.
void print(raw_ostream &OS, const PrintingPolicy &Policy) const
bool isEmpty() const
Evaluates true when this declaration name is empty.
Represents a function declaration or definition.
@ TK_FunctionTemplateSpecialization
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Encapsulates the data about a macro definition (e.g.
This represents a decl that may have a name.
Represents an ObjC class declaration.
ObjCInterfaceDecl * getSuperClass() const
ObjCMethodDecl - Represents an instance or class method declaration.
ArrayRef< ParmVarDecl * > parameters() const
unsigned param_size() const
bool isPropertyAccessor() const
Selector getSelector() const
bool isInstanceMethod() const
QualType getReturnType() const
ObjCInterfaceDecl * getClassInterface()
StringRef getNameForSlot(unsigned argIndex) const
Retrieve the name at a given position in the selector.
Represents the declaration of a struct/union/class/enum.
TagDecl * getAsTagDecl() const
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is...
Base class for declarations which introduce a typedef-name.
QualType getUnderlyingType() const
void applyForEachSymbolProperty(SymbolPropertySet Props, llvm::function_ref< void(SymbolProperty)> Fn)
SymbolRole
Set of roles that are attributed to symbol occurrences.
@ RelationSpecializationOf
StringRef getSymbolSubKindString(SymbolSubKind K)
void printSymbolProperties(SymbolPropertySet Props, raw_ostream &OS)
SymbolInfo getSymbolInfo(const Decl *D)
StringRef getSymbolKindString(SymbolKind K)
bool isFunctionLocalSymbol(const Decl *D)
void applyForEachSymbolRole(SymbolRoleSet Roles, llvm::function_ref< void(SymbolRole)> Fn)
void printSymbolRoles(SymbolRoleSet Roles, raw_ostream &OS)
SymbolInfo getSymbolInfoForMacro(const MacroInfo &MI)
bool printSymbolName(const Decl *D, const LangOptions &LO, raw_ostream &OS)
bool applyForEachSymbolRoleInterruptible(SymbolRoleSet Roles, llvm::function_ref< bool(SymbolRole)> Fn)
SymbolProperty
Set of properties that provide additional info about a symbol.
@ TemplatePartialSpecialization
@ ProtocolInterface
Symbol is part of a protocol interface.
uint16_t SymbolPropertySet
StringRef getSymbolLanguageString(SymbolLanguage K)
SymbolSubKind
Language specific sub-kinds.
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
@ VisibleNone
No linkage according to the standard, but is visible from other translation units because of types de...
@ None
No linkage, which means that the entity is unique and can only be referred to from within its scope.
@ UniqueExternal
External linkage within a unique namespace.
@ Internal
Internal linkage, which indicates that the entity can be referred to from within the translation unit...
@ External
External linkage, which indicates that the entity can be referred to from other translation units.
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
@ Interface
The "__interface" keyword.
@ Struct
The "struct" keyword.
@ Class
The "class" keyword.
@ Union
The "union" keyword.
@ Enum
The "enum" keyword.
U cast(CodeGen::Address addr)
Describes how types, statements, expressions, and declarations should be printed.
unsigned SuppressTemplateArgsInCXXConstructors
When true, suppresses printing template arguments in names of C++ constructors.
SymbolPropertySet Properties