clang API Documentation
#include <DeclBase.h>


Classes | |
| struct | EmptyShell |
| A placeholder type used to construct an empty shell of a decl-derived type that will be filled in later (e.g., by some deserialization method). More... | |
| struct | MultipleDC |
| class | redecl_iterator |
| Iterates through all the redeclarations of the same decl. More... | |
Public Types | |
| enum | Kind |
| Lists the kind of concrete classes of Decl. More... | |
| enum | IdentifierNamespace { IDNS_Label = 0x0001, IDNS_Tag = 0x0002, IDNS_Type = 0x0004, IDNS_Member = 0x0008, IDNS_Namespace = 0x0010, IDNS_Ordinary = 0x0020, IDNS_ObjCProtocol = 0x0040, IDNS_OrdinaryFriend = 0x0080, IDNS_TagFriend = 0x0100, IDNS_Using = 0x0200, IDNS_NonMemberOperator = 0x0400 } |
| enum | ObjCDeclQualifier { OBJC_TQ_None = 0x0, OBJC_TQ_In = 0x1, OBJC_TQ_Inout = 0x2, OBJC_TQ_Out = 0x4, OBJC_TQ_Bycopy = 0x8, OBJC_TQ_Byref = 0x10, OBJC_TQ_Oneway = 0x20 } |
| enum | FriendObjectKind { FOK_None, FOK_Declared, FOK_Undeclared } |
| typedef AttrVec::const_iterator | attr_iterator |
Public Member Functions | |
| virtual SourceRange | getSourceRange () const |
| Source range that this declaration covers. | |
| SourceLocation | getLocStart () const |
| SourceLocation | getLocEnd () const |
| SourceLocation | getLocation () const |
| void | setLocation (SourceLocation L) |
| Kind | getKind () const |
| const char * | getDeclKindName () const |
| Decl * | getNextDeclInContext () |
| const Decl * | getNextDeclInContext () const |
| DeclContext * | getDeclContext () |
| const DeclContext * | getDeclContext () const |
| DeclContext * | getNonClosureContext () |
| const DeclContext * | getNonClosureContext () const |
| TranslationUnitDecl * | getTranslationUnitDecl () |
| const TranslationUnitDecl * | getTranslationUnitDecl () const |
| bool | isInAnonymousNamespace () const |
| ASTContext & | getASTContext () const |
| void | setAccess (AccessSpecifier AS) |
| AccessSpecifier | getAccess () const |
| bool | hasAttrs () const |
| void | setAttrs (const AttrVec &Attrs) |
| AttrVec & | getAttrs () |
| const AttrVec & | getAttrs () const |
| void | swapAttrs (Decl *D) |
| void | dropAttrs () |
| void | addAttr (Attr *A) |
| attr_iterator | attr_begin () const |
| attr_iterator | attr_end () const |
| template<typename T > | |
| void | dropAttr () |
| template<typename T > | |
| specific_attr_iterator< T > | specific_attr_begin () const |
| template<typename T > | |
| specific_attr_iterator< T > | specific_attr_end () const |
| template<typename T > | |
| T * | getAttr () const |
| template<typename T > | |
| bool | hasAttr () const |
| unsigned | getMaxAlignment () const |
| void | setInvalidDecl (bool Invalid=true) |
| bool | isInvalidDecl () const |
| bool | isImplicit () const |
| void | setImplicit (bool I=true) |
| bool | isUsed (bool CheckUsedAttr=true) const |
| Whether this declaration was used, meaning that a definition is required. | |
| void | setUsed (bool U=true) |
| bool | isReferenced () const |
| Whether this declaration was referenced. | |
| void | setReferenced (bool R=true) |
| bool | isTopLevelDeclInObjCContainer () const |
| Whether this declaration is a top-level declaration (function, global variable, etc.) that is lexically inside an objc container definition. | |
| void | setTopLevelDeclInObjCContainer (bool V=true) |
| AvailabilityResult | getAvailability (std::string *Message=0) const |
| Determine the availability of the given declaration. | |
| bool | isDeprecated (std::string *Message=0) const |
| Determine whether this declaration is marked 'deprecated'. | |
| bool | isUnavailable (std::string *Message=0) const |
| Determine whether this declaration is marked 'unavailable'. | |
| bool | isWeakImported () const |
| Determine whether this is a weak-imported symbol. | |
| bool | canBeWeakImported (bool &IsDefinition) const |
| Determines whether this symbol can be weak-imported, e.g., whether it would be well-formed to add the weak_import attribute. | |
| bool | isFromASTFile () const |
| Determine whether this declaration came from an AST file (such as a precompiled header or module) rather than having been parsed. | |
| unsigned | getGlobalID () const |
| Retrieve the global declaration ID associated with this declaration, which specifies where in the. | |
| unsigned | getOwningModuleID () const |
| Retrieve the global ID of the module that owns this particular declaration. | |
| unsigned | getIdentifierNamespace () const |
| bool | isInIdentifierNamespace (unsigned NS) const |
| bool | hasTagIdentifierNamespace () const |
| DeclContext * | getLexicalDeclContext () |
| const DeclContext * | getLexicalDeclContext () const |
| virtual bool | isOutOfLine () const |
| void | setDeclContext (DeclContext *DC) |
| void | setLexicalDeclContext (DeclContext *DC) |
| bool | isDefinedOutsideFunctionOrMethod () const |
| const DeclContext * | getParentFunctionOrMethod () const |
| If this decl is defined inside a function/method/block it returns the corresponding DeclContext, otherwise it returns null. | |
| DeclContext * | getParentFunctionOrMethod () |
| virtual Decl * | getCanonicalDecl () |
| Retrieves the "canonical" declaration of the given declaration. | |
| const Decl * | getCanonicalDecl () const |
| bool | isCanonicalDecl () const |
| Whether this particular Decl is a canonical one. | |
| redecl_iterator | redecls_begin () const |
| Returns iterator for all the redeclarations of the same decl. It will iterate at least once (when this decl is the only one). | |
| redecl_iterator | redecls_end () const |
| Decl * | getPreviousDecl () |
| Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration. | |
| const Decl * | getPreviousDecl () const |
| Retrieve the most recent declaration that declares the same entity as this declaration, or NULL if there is no previous declaration. | |
| Decl * | getMostRecentDecl () |
| Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration). | |
| const Decl * | getMostRecentDecl () const |
| Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration). | |
| virtual Stmt * | getBody () const |
| virtual bool | hasBody () const |
| Returns true if this Decl represents a declaration for a body of code, such as a function or method definition. | |
| SourceLocation | getBodyRBrace () const |
| bool | isTemplateParameter () const |
| bool | isTemplateParameterPack () const |
| bool | isParameterPack () const |
| Whether this declaration is a parameter pack. | |
| bool | isTemplateDecl () const |
| returns true if this declaration is a template | |
| bool | isFunctionOrFunctionTemplate () const |
| Whether this declaration is a function or function template. | |
| void | setObjectOfFriendDecl (bool PreviouslyDeclared) |
| Changes the namespace of this declaration to reflect that it's the object of a friend declaration. | |
| FriendObjectKind | getFriendObjectKind () const |
| Determines whether this declaration is the object of a friend declaration and, if so, what kind. | |
| void | setNonMemberOperator () |
| Specifies that this declaration is a C++ overloaded non-member. | |
| void | print (raw_ostream &Out, unsigned Indentation=0, bool PrintInstantiation=false) const |
| void | print (raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation=0, bool PrintInstantiation=false) const |
| void | dump () const |
| void | dumpXML () const |
| void | dumpXML (raw_ostream &OS) const |
Static Public Member Functions | |
| static unsigned | getIdentifierNamespaceForKind (Kind DK) |
| static bool | isTagIdentifierNamespace (unsigned NS) |
| static void | add (Kind k) |
| static bool | CollectingStats (bool Enable=false) |
| static void | PrintStats () |
| static bool | classof (const Decl *) |
| static bool | classofKind (Kind K) |
| static DeclContext * | castToDeclContext (const Decl *) |
| static Decl * | castFromDeclContext (const DeclContext *) |
| static void | printGroup (Decl **Begin, unsigned NumDecls, raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation=0) |
Protected Types | |
| enum | { TopLevelDeclInObjCContainerFlag = 0x01, ModulePrivateFlag = 0x02 } |
Protected Member Functions | |
| Decl (Kind DK, DeclContext *DC, SourceLocation L) | |
| Decl (Kind DK, EmptyShell Empty) | |
| virtual | ~Decl () |
| bool | isModulePrivate () const |
| Whether this declaration was marked as being private to the module in which it was defined. | |
| void | setModulePrivate (bool MP=true) |
| Specify whether this declaration was marked as being private to the module in which it was defined. | |
| void | setOwningModuleID (unsigned ID) |
| Set the owning module ID. | |
| virtual Decl * | getNextRedeclaration () |
| Returns the next redeclaration or itself if this is the only decl. | |
| virtual Decl * | getPreviousDeclImpl () |
| Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain. | |
| virtual Decl * | getMostRecentDeclImpl () |
| Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain. | |
| ASTMutationListener * | getASTMutationListener () const |
Static Protected Member Functions | |
| static void * | AllocateDeserializedDecl (const ASTContext &Context, unsigned ID, unsigned Size) |
| Allocate memory for a deserialized declaration. | |
Protected Attributes | |
| llvm::PointerIntPair< Decl *, 2, unsigned > | NextInContextAndBits |
| The next declaration within the same lexical DeclContext. These pointers form the linked list that is traversed via DeclContext's decls_begin()/decls_end(). | |
| unsigned | Access: 2 |
| Access - Used by C++ decls for the access specifier. | |
| unsigned | FromASTFile: 1 |
| Whether this declaration was loaded from an AST file. | |
| unsigned | Hidden: 1 |
| Whether this declaration is hidden from normal name lookup, e.g., because it is was loaded from an AST file is either module-private or because its submodule has not been made visible. | |
| unsigned | IdentifierNamespace: 12 |
| IdentifierNamespace - This specifies what IDNS_* namespace this lives in. | |
| unsigned | HasCachedLinkage: 1 |
Whether the CachedLinkage field is active. | |
| unsigned | CachedLinkage: 2 |
If HasCachedLinkage, the linkage of this declaration. | |
Friends | |
| class | DeclContext |
| class | CXXClassMemberWrapper |
| class | ASTDeclWriter |
| class | ASTDeclReader |
| class | ASTReader |
Decl - This represents one declaration (or definition), e.g. a variable, typedef, function, struct, etc.
Definition at line 77 of file DeclBase.h.
| typedef AttrVec::const_iterator clang::Decl::attr_iterator |
Definition at line 407 of file DeclBase.h.
anonymous enum [protected] |
| TopLevelDeclInObjCContainerFlag |
Whether this declaration is a top-level declaration (function, global variable, etc.) that is lexically inside an objc container definition. |
| ModulePrivateFlag |
Whether this declaration is private to the module in which it was defined. |
Definition at line 185 of file DeclBase.h.
Definition at line 810 of file DeclBase.h.
IdentifierNamespace - The different namespaces in which declarations may appear. According to C99 6.2.3, there are four namespaces, labels, tags, members and ordinary identifiers. C++ describes lookup completely differently: certain lookups merely "ignore" certain kinds of declarations, usually based on whether the declaration is of a type, etc.
These are meant as bitmasks, so that searches in C++ can look into the "tag" namespace during ordinary lookup.
Decl currently provides 15 bits of IDNS bits.
| IDNS_Label |
Labels, declared with 'x:' and referenced with 'goto x'. |
| IDNS_Tag |
Tags, declared with 'struct foo;' and referenced with 'struct foo'. All tags are also types. This is what elaborated-type-specifiers look for in C. |
| IDNS_Type |
Types, declared with 'struct foo', typedefs, etc. This is what elaborated-type-specifiers look for in C++, but note that it's ill-formed to find a non-tag. |
| IDNS_Member |
Members, declared with object declarations within tag definitions. In C, these can only be found by "qualified" lookup in member expressions. In C++, they're found by normal lookup. |
| IDNS_Namespace |
Namespaces, declared with 'namespace foo {}'. Lookup for nested-name-specifiers find these. |
| IDNS_Ordinary |
Ordinary names. In C, everything that's not a label, tag, or member ends up here. |
| IDNS_ObjCProtocol | |
| IDNS_OrdinaryFriend |
This declaration is a friend function. A friend function declaration is always in this namespace but may also be in IDNS_Ordinary if it was previously declared. |
| IDNS_TagFriend |
This declaration is a friend class. A friend class declaration is always in this namespace but may also be in IDNS_Tag|IDNS_Type if it was previously declared. |
| IDNS_Using |
This declaration is a using declaration. A using declaration introduces* a number of other declarations into the current scope, and those declarations use the IDNS of their targets, but the actual using declarations go in this namespace. |
| IDNS_NonMemberOperator |
This declaration is a C++ operator declared in a non-class context. All such operators are also in IDNS_Ordinary. C++ lexical operator lookup looks for these. |
Definition at line 106 of file DeclBase.h.
| enum clang::Decl::Kind |
Lists the kind of concrete classes of Decl.
Reimplemented in clang::ObjCPropertyImplDecl.
Definition at line 80 of file DeclBase.h.
ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declarations. Other than remembering them and mangling them into the method's signature string, these are ignored by the compiler; they are consumed by certain remote-messaging frameworks.
in, inout, and out are mutually exclusive and apply only to method parameters. bycopy and byref are mutually exclusive and apply only to method parameters (?). oneway applies only to results. All of these expect their corresponding parameter to have a particular type. None of this is currently enforced by clang.
This should be kept in sync with ObjCDeclSpec::ObjCDeclQualifier.
| OBJC_TQ_None | |
| OBJC_TQ_In | |
| OBJC_TQ_Inout | |
| OBJC_TQ_Out | |
| OBJC_TQ_Bycopy | |
| OBJC_TQ_Byref | |
| OBJC_TQ_Oneway |
Definition at line 173 of file DeclBase.h.
| clang::Decl::Decl | ( | Kind | DK, |
| DeclContext * | DC, | ||
| SourceLocation | L | ||
| ) | [inline, protected] |
Definition at line 299 of file DeclBase.h.
References add(), and CollectingStats().
| clang::Decl::Decl | ( | Kind | DK, |
| EmptyShell | Empty | ||
| ) | [inline, protected] |
Definition at line 310 of file DeclBase.h.
References add(), and CollectingStats().
| Decl::~Decl | ( | ) | [protected, virtual] |
Definition at line 195 of file DeclBase.cpp.
| void Decl::add | ( | Kind | k | ) | [static] |
Definition at line 120 of file DeclBase.cpp.
Referenced by Decl().
| void clang::Decl::addAttr | ( | Attr * | A | ) | [inline] |
Definition at line 400 of file DeclBase.h.
References getAttrs(), hasAttrs(), and setAttrs().
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnPragmaUnused(), clang::Sema::ActOnPragmaWeakID(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignmentAttributesForRecord(), clang::Sema::AddCFAuditedAttribute(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddMsStructLayoutForRecord(), AddPropertyAttrs(), clang::Sema::AddPushedVisibilityAttribute(), clang::Sema::AttachBaseSpecifiers(), CheckARCMethodDecl(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::checkInitMethod(), clang::Sema::CheckNontrivialField(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DeclareGlobalAllocationFunction(), handleAcquireOrderAttr(), handleAliasAttr(), handleAlignedAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArcWeakrefUnavailableAttr(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallConvAttr(), handleCFTransferAttr(), handleCleanupAttr(), handleCommonAttr(), handleConstantAttr(), handleConstAttr(), handleConstructorAttr(), handleDelayedForbiddenType(), handleDeprecatedAttr(), handleDestructorAttr(), handleDeviceAttr(), HandleDLLExportAttr(), HandleDLLImportAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleGuardedVarAttr(), handleHostAttr(), handleIBAction(), handleIBOutlet(), handleIBOutletCollection(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), handleLockableAttr(), handleLockFunAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLocksRequiredAttr(), handleMallocAttr(), handleMayAliasAttr(), HandleMBlazeInterruptHandlerAttr(), HandleMBlazeSaveVolatilesAttr(), HandleMSP430InterruptAttr(), handleNakedAttr(), handleNoAddressSafetyAttr(), handleNoCommonAttr(), handleNoDebugAttr(), handleNoInlineAttr(), handleNoInstrumentFunctionAttr(), handleNonNullAttr(), handleNoReturnAttr(), handleNoThreadSafetyAttr(), handleNothrowAttr(), handleNSBridgedAttr(), handleNSConsumedAttr(), handleNSConsumesSelfAttr(), handleNSReturnsRetainedAttr(), handleObjCExceptionAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresPropertyDefsAttr(), handleObjCReturnsInnerPointerAttr(), handleOpenCLKernelAttr(), handleOverloadableAttr(), handleOwnershipAttr(), handlePureAttr(), handleRegparmAttr(), handleReqdWorkGroupSize(), handleReturnsTwiceAttr(), handleSectionAttr(), handleSentinelAttr(), handleSharedAttr(), handleTransparentUnionAttr(), handleTrylockFunAttr(), handleUnavailableAttr(), handleUnlockFunAttr(), handleUnusedAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakAttr(), handleWeakImportAttr(), handleWeakRefAttr(), HandleX86ForceAlignArgPointerAttr(), clang::Sema::InstantiateAttrs(), clang::Sema::makeUnavailableInSystemHeader(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), and clang::Sema::ProcessPropertyDecl().
| void * Decl::AllocateDeserializedDecl | ( | const ASTContext & | Context, |
| unsigned | ID, | ||
| unsigned | Size | ||
| ) | [static, protected] |
Allocate memory for a deserialized declaration.
This routine must be used to allocate memory for any declaration that is deserialized from a module file.
| Context | The context in which we will allocate memory. |
| ID | The global ID of the deserialized declaration. |
| Size | The size of the allocated object. |
Definition at line 44 of file DeclBase.cpp.
References clang::ASTContext::Allocate().
Referenced by clang::FriendDecl::CreateDeserialized(), clang::AccessSpecDecl::CreateDeserialized(), clang::ObjCMethodDecl::CreateDeserialized(), clang::LabelDecl::CreateDeserialized(), clang::NamespaceDecl::CreateDeserialized(), clang::ObjCInterfaceDecl::CreateDeserialized(), clang::CXXRecordDecl::CreateDeserialized(), clang::FunctionTemplateDecl::CreateDeserialized(), clang::VarDecl::CreateDeserialized(), clang::TemplateTypeParmDecl::CreateDeserialized(), clang::NonTypeTemplateParmDecl::CreateDeserialized(), clang::ObjCIvarDecl::CreateDeserialized(), clang::ObjCAtDefsFieldDecl::CreateDeserialized(), clang::ObjCProtocolDecl::CreateDeserialized(), clang::TemplateTemplateParmDecl::CreateDeserialized(), clang::ImplicitParamDecl::CreateDeserialized(), clang::ParmVarDecl::CreateDeserialized(), clang::ClassTemplateSpecializationDecl::CreateDeserialized(), clang::ObjCCategoryDecl::CreateDeserialized(), clang::CXXMethodDecl::CreateDeserialized(), clang::ObjCCategoryImplDecl::CreateDeserialized(), clang::ClassTemplatePartialSpecializationDecl::CreateDeserialized(), clang::FunctionDecl::CreateDeserialized(), clang::ObjCImplementationDecl::CreateDeserialized(), clang::ObjCCompatibleAliasDecl::CreateDeserialized(), clang::ClassTemplateDecl::CreateDeserialized(), clang::ObjCPropertyDecl::CreateDeserialized(), clang::CXXConstructorDecl::CreateDeserialized(), clang::ObjCPropertyImplDecl::CreateDeserialized(), clang::FriendTemplateDecl::CreateDeserialized(), clang::TypeAliasTemplateDecl::CreateDeserialized(), clang::CXXDestructorDecl::CreateDeserialized(), clang::FieldDecl::CreateDeserialized(), clang::ClassScopeFunctionSpecializationDecl::CreateDeserialized(), clang::CXXConversionDecl::CreateDeserialized(), clang::EnumConstantDecl::CreateDeserialized(), clang::LinkageSpecDecl::CreateDeserialized(), clang::IndirectFieldDecl::CreateDeserialized(), clang::UsingDirectiveDecl::CreateDeserialized(), clang::TypedefDecl::CreateDeserialized(), clang::TypeAliasDecl::CreateDeserialized(), clang::NamespaceAliasDecl::CreateDeserialized(), clang::UsingShadowDecl::CreateDeserialized(), clang::UsingDecl::CreateDeserialized(), clang::UnresolvedUsingValueDecl::CreateDeserialized(), clang::EnumDecl::CreateDeserialized(), clang::UnresolvedUsingTypenameDecl::CreateDeserialized(), clang::StaticAssertDecl::CreateDeserialized(), clang::RecordDecl::CreateDeserialized(), clang::FileScopeAsmDecl::CreateDeserialized(), clang::BlockDecl::CreateDeserialized(), and clang::ImportDecl::CreateDeserialized().
| attr_iterator clang::Decl::attr_begin | ( | ) | const [inline] |
Definition at line 411 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by AddPropertyAttrs(), clang::CodeCompletionResult::CreateCodeCompletionString(), DeclHasAttr(), getAvailability(), clang::Sema::InstantiateAttrs(), isWeakImported(), and specific_attr_begin().
| attr_iterator clang::Decl::attr_end | ( | ) | const [inline] |
Definition at line 414 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by AddPropertyAttrs(), clang::CodeCompletionResult::CreateCodeCompletionString(), DeclHasAttr(), getAvailability(), clang::Sema::InstantiateAttrs(), isWeakImported(), and specific_attr_end().
| bool Decl::canBeWeakImported | ( | bool & | IsDefinition | ) | const |
Determines whether this symbol can be weak-imported, e.g., whether it would be well-formed to add the weak_import attribute.
| IsDefinition | Set to true to indicate that this declaration cannot be weak-imported because it has a definition. |
Definition at line 405 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getLangOptions().
Referenced by handleWeakImportAttr(), and isWeakImported().
| Decl * Decl::castFromDeclContext | ( | const DeclContext * | D | ) | [static] |
Reimplemented in clang::BlockDecl, clang::TagDecl, clang::LinkageSpecDecl, clang::FunctionDecl, clang::ObjCContainerDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, and clang::TranslationUnitDecl.
Definition at line 583 of file DeclBase.cpp.
References clang::DeclContext::getDeclKind().
Referenced by clang::cast_convert_decl_context< ToTy, IsKnownSubtype >::doit().
| DeclContext * Decl::castToDeclContext | ( | const Decl * | D | ) | [static] |
Definition at line 602 of file DeclBase.cpp.
References getKind().
| static bool clang::Decl::classof | ( | const Decl * | ) | [inline, static] |
Reimplemented in clang::ImportDecl, clang::BlockDecl, clang::FileScopeAsmDecl, clang::RecordDecl, clang::EnumDecl, clang::StaticAssertDecl, clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::NamespaceAliasDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::TypedefNameDecl, clang::UsingDirectiveDecl, clang::TypeDecl, clang::IndirectFieldDecl, clang::LinkageSpecDecl, clang::EnumConstantDecl, clang::CXXConversionDecl, clang::FieldDecl, clang::CXXDestructorDecl, clang::ClassScopeFunctionSpecializationDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::CXXConstructorDecl, clang::ObjCPropertyImplDecl, clang::FriendTemplateDecl, clang::ObjCPropertyDecl, clang::ClassTemplateDecl, clang::ObjCCompatibleAliasDecl, clang::ObjCImplementationDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXMethodDecl, clang::ObjCCategoryImplDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCImplDecl, clang::CXXRecordDecl, clang::ObjCCategoryDecl, clang::ParmVarDecl, clang::ObjCProtocolDecl, clang::TemplateTemplateParmDecl, clang::ImplicitParamDecl, clang::VarDecl, clang::NonTypeTemplateParmDecl, clang::ObjCAtDefsFieldDecl, clang::ObjCIvarDecl, clang::ObjCInterfaceDecl, clang::TemplateTypeParmDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::ObjCContainerDecl, clang::ValueDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, clang::LabelDecl, clang::NamedDecl, clang::TemplateDecl, clang::AccessSpecDecl, clang::FriendDecl, and clang::TranslationUnitDecl.
Definition at line 837 of file DeclBase.h.
| static bool clang::Decl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented in clang::ImportDecl, clang::BlockDecl, clang::FileScopeAsmDecl, clang::RecordDecl, clang::EnumDecl, clang::StaticAssertDecl, clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::NamespaceAliasDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::TypedefNameDecl, clang::UsingDirectiveDecl, clang::TypeDecl, clang::IndirectFieldDecl, clang::LinkageSpecDecl, clang::EnumConstantDecl, clang::CXXConversionDecl, clang::FieldDecl, clang::CXXDestructorDecl, clang::ClassScopeFunctionSpecializationDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::CXXConstructorDecl, clang::ObjCPropertyImplDecl, clang::FriendTemplateDecl, clang::ObjCPropertyDecl, clang::ClassTemplateDecl, clang::ObjCCompatibleAliasDecl, clang::ObjCImplementationDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXMethodDecl, clang::ObjCCategoryImplDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCImplDecl, clang::CXXRecordDecl, clang::ObjCCategoryDecl, clang::ParmVarDecl, clang::ObjCProtocolDecl, clang::TemplateTemplateParmDecl, clang::ImplicitParamDecl, clang::VarDecl, clang::NonTypeTemplateParmDecl, clang::ObjCAtDefsFieldDecl, clang::ObjCIvarDecl, clang::ObjCInterfaceDecl, clang::TemplateTypeParmDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::ObjCContainerDecl, clang::ValueDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, clang::LabelDecl, clang::NamedDecl, clang::TemplateDecl, clang::AccessSpecDecl, clang::FriendDecl, and clang::TranslationUnitDecl.
Definition at line 838 of file DeclBase.h.
| bool Decl::CollectingStats | ( | bool | Enable = false | ) | [static] |
Definition at line 91 of file DeclBase.cpp.
References StatSwitch.
Referenced by Decl(), and clang::ParseAST().
| void clang::Decl::dropAttr | ( | ) | [inline] |
Definition at line 419 of file DeclBase.h.
References getAttrs().
Referenced by clang::Sema::MergeVarDecl().
| void Decl::dropAttrs | ( | ) |
Definition at line 545 of file DeclBase.cpp.
References clang::ASTContext::eraseDeclAttrs(), and getASTContext().
Referenced by clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), and StripImplicitInstantiation().
| void Decl::dump | ( | ) | const |
Definition at line 176 of file DeclPrinter.cpp.
References print().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::arcmt::trans::MigrationContext::dumpGCAttrs(), and clang::ASTContext::DumpRecordLayout().
| void Decl::dumpXML | ( | ) | const |
Definition at line 1016 of file DumpXML.cpp.
| void Decl::dumpXML | ( | raw_ostream & | OS | ) | const |
Definition at line 1020 of file DumpXML.cpp.
References getASTContext().
| AccessSpecifier clang::Decl::getAccess | ( | ) | const [inline] |
Definition at line 384 of file DeclBase.h.
References Access.
Referenced by clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), clang::LookupResult::addDecl(), clang::Sema::BuildAnonymousStructUnionMemberReference(), BuildCXXCastArgument(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckDirectMemberAccess(), clang::Sema::CheckFunctionDeclaration(), clang::MemberExpr::Create(), clang::Sema::DeclareInheritedConstructors(), DiagnoseAccessPath(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), IsAccessible(), IsMicrosoftUsingDeclarationAccessBug(), clang::Sema::IsSimplyAccessible(), clang::IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), clang::Sema::LookupQualifiedName(), clang::Sema::MergeVarDecl(), PerformConstructorInitialization(), ResolveConstructorOverload(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::ShouldDeleteSpecialMember(), TryConstructorInitialization(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), clang::TemplateDeclInstantiator::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionTemplateDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::TemplateDeclInstantiator::VisitUnresolvedUsingTypenameDecl(), clang::TemplateDeclInstantiator::VisitUnresolvedUsingValueDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), clang::ASTDeclWriter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| ASTContext & Decl::getASTContext | ( | ) | const |
Reimplemented in clang::TranslationUnitDecl.
Definition at line 241 of file DeclBase.cpp.
References clang::TranslationUnitDecl::getASTContext(), and getTranslationUnitDecl().
Referenced by clang::DeclContext::addHiddenDecl(), AddObjCProperties(), clang::CXXMethodDecl::addOverriddenMethod(), clang::CXXMethodDecl::begin_overridden_methods(), canBeWeakImported(), clang::VarDecl::checkInitIsICE(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::CXXRecordDecl::completeDefinition(), computeDeclRefDependence(), clang::PredefinedExpr::ComputeName(), clang::NamedDecl::declarationReplaces(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), dropAttrs(), dumpXML(), clang::CXXMethodDecl::end_overridden_methods(), clang::VarDecl::ensureEvaluatedStmt(), clang::VarDecl::evaluateValue(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::RedeclarableTemplateDecl::findSpecializationImpl(), clang::AnalysisDeclContext::getASTContext(), getASTMutationListener(), getAttrs(), getAvailability(), clang::ASTRecordLayout::getBaseClassOffsetInBits(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getBuiltinID(), clang::LambdaExpr::getCallOperator(), clang::FunctionDecl::getCallResultType(), clang::AnalysisDeclContext::getCFG(), clang::FunctionDecl::getClassScopeSpecializationPattern(), clang::RedeclarableTemplateDecl::getCommonPtr(), clang::CXXRecordDecl::getCopyAssignmentOperator(), clang::CXXRecordDecl::getCopyConstructor(), clang::CXXRecordDecl::getDestructor(), clang::FieldDecl::getFieldIndex(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCCategoryDecl::getImplementation(), clang::CXXRecordDecl::getIndirectPrimaryBases(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::FunctionTemplateDecl::getInjectedTemplateArgs(), getLVForClassMember(), getLVForNamespaceScopeDecl(), getMaxAlignment(), clang::VarDecl::getMemberSpecializationInfo(), clang::FunctionDecl::getMinRequiredArguments(), clang::NamedDecl::getQualifiedNameAsString(), clang::ObjCMethodDecl::getSendResultType(), clang::idx::Indexer::GetTranslationUnitsFor(), clang::AnalysisDeclContext::getUnoptimizedCFG(), clang::ASTRecordLayout::getVBaseClassOffsetInBits(), getVisibilityOf(), clang::CXXRecordDecl::getVisibleConversionFunctions(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::VarDecl::isExternC(), clang::FunctionDecl::isExternC(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Expr::isPotentialConstantExpr(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), clang::VarDecl::isThisDeclarationADefinition(), clang::VarDecl::isUsableInConstantExpressions(), clang::CXXMethodDecl::isUsualDeallocationFunction(), isWeakImported(), clang::ClassTemplateDecl::LoadLazySpecializations(), clang::CXXRecordDecl::lookupInBases(), clang::idx::ASTLocation::print(), print(), clang::FunctionTemplateSpecializationInfo::Profile(), clang::ClassTemplateSpecializationDecl::Profile(), clang::ObjCMethodDecl::setAsRedeclaration(), setAttrs(), clang::CXXRecordDecl::setBases(), clang::ObjCImplDecl::setClassInterface(), clang::ObjCInterfaceDecl::setExternallyCompleted(), clang::ClassTemplateSpecializationDecl::setExternLoc(), clang::FunctionDecl::setFunctionTemplateSpecialization(), clang::ObjCInterfaceDecl::setImplementation(), clang::ObjCCategoryDecl::setImplementation(), clang::VarDecl::setInit(), clang::ClassTemplateSpecializationDecl::setInstantiationOf(), clang::CXXRecordDecl::setInstantiationOfMemberClass(), clang::FunctionDecl::setInstantiationOfMemberFunction(), setLexicalDeclContext(), SetNestedNameSpecifier(), clang::FunctionDecl::setParams(), clang::BlockDecl::setParams(), clang::DeclaratorDecl::setQualifierInfo(), clang::TagDecl::setQualifierInfo(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::TagDecl::setTemplateParameterListsInfo(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), shouldRunOnFunctionOrMethod(), clang::CXXMethodDecl::size_overridden_methods(), clang::TagDecl::startDefinition(), and swapAttrs().
| ASTMutationListener * Decl::getASTMutationListener | ( | ) | const [protected] |
Definition at line 245 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getASTMutationListener().
Referenced by clang::ClassTemplateDecl::AddPartialSpecialization(), clang::FunctionTemplateDecl::addSpecialization(), clang::ClassTemplateDecl::AddSpecialization(), and clang::TagDecl::completeDefinition().
| T* clang::Decl::getAttr | ( | ) | const [inline] |
Definition at line 444 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::AddKnownFunctionAttributes(), AddVariableConstraints(), checkForLockableRecord(), checkObjCDealloc(), clang::Sema::CheckObjCPropertyAttributes(), checkObjCUnusedIvar(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseUnusedExprResult(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), getCallingConventionForDecl(), clang::CodeGen::CodeGenModule::GetLLVMLinkageVarDefinition(), getVisibilityOf(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), handleAcquireOrderAttr(), handleCFTransferAttr(), handleConstAttr(), HandleDLLImportAttr(), handleNothrowAttr(), handleVecReturnAttr(), clang::Expr::isUnusedResultAWarning(), MaybeAddSentinel(), and clang::Sema::MergeVarDecl().
| AttrVec& clang::Decl::getAttrs | ( | ) | [inline] |
Definition at line 393 of file DeclBase.h.
Referenced by clang::Sema::ActOnMethodDeclaration(), addAttr(), attr_begin(), attr_end(), containsInvalidMethodImplAttribute(), dropAttr(), getAttr(), getMaxAlignment(), hasAttr(), and clang::ASTDeclWriter::VisitDecl().
| const AttrVec & Decl::getAttrs | ( | ) | const |
Definition at line 552 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getDeclAttrs().
| AvailabilityResult Decl::getAvailability | ( | std::string * | Message = 0 | ) | const |
Determine the availability of the given declaration.
This routine will determine the most restrictive availability of the given declaration (e.g., preferring 'unavailable' to 'deprecated').
| Message | If non-NULL and the result is not AR_Available, will be set to a (possibly empty) message describing why the declaration has not been introduced, is deprecated, or is unavailable. |
Definition at line 362 of file DeclBase.cpp.
References clang::AR_Available, clang::AR_Deprecated, clang::AR_Unavailable, attr_begin(), attr_end(), CheckAvailability(), and getASTContext().
Referenced by clang::Sema::addMethodToGlobalList(), clang::Sema::CanUseDecl(), clang::Sema::DiagnoseAvailabilityOfDecl(), clang::Sema::getCurContextAvailability(), clang::Sema::getDeletedOrUnavailableSuffix(), isDeprecated(), and isUnavailable().
| virtual Stmt* clang::Decl::getBody | ( | ) | const [inline, virtual] |
getBody - If this Decl represents a declaration for a body of code, such as a function or method definition, this method returns the top-level Stmt* of that body. Otherwise this method returns null.
Reimplemented in clang::BlockDecl, clang::FunctionDecl, and clang::ObjCMethodDecl.
Definition at line 750 of file DeclBase.h.
Referenced by CheckStringRefAssignedTemporary(), clang::ento::PathDiagnosticLocation::createDeclBegin(), clang::FunctionDecl::getBody(), getBodyRBrace(), hasBody(), and clang::sema::AnalysisBasedWarnings::IssueWarnings().
| SourceLocation Decl::getBodyRBrace | ( | ) | const |
getBodyRBrace - Gets the right brace of the body, if a body exists. This works whether the body is a CompoundStmt or a CXXTryStmt.
Definition at line 621 of file DeclBase.cpp.
References getBody(), clang::SourceRange::getEnd(), and clang::FunctionDecl::getSourceRange().
Referenced by clang::ento::PathDiagnosticLocation::createDeclEnd(), and clang::CodeGen::CodeGenFunction::GenerateObjCMethod().
| virtual Decl* clang::Decl::getCanonicalDecl | ( | ) | [inline, virtual] |
Retrieves the "canonical" declaration of the given declaration.
Reimplemented in clang::EnumDecl, clang::TagDecl, clang::TypedefNameDecl, clang::CXXConstructorDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionDecl, clang::CXXMethodDecl, clang::ObjCProtocolDecl, clang::ObjCInterfaceDecl, clang::VarDecl, clang::FunctionTemplateDecl, clang::CXXRecordDecl, clang::RedeclarableTemplateDecl, clang::NamespaceDecl, and clang::ObjCMethodDecl.
Definition at line 654 of file DeclBase.h.
Referenced by clang::Sema::BuildCXXNestedNameSpecifier(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckTemplateArgumentPointerToMember(), compareDeclarations(), clang::declaresSameEntity(), DeduceNonTypeTemplateArgument(), DeduceTemplateArguments(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseUseOfDecl(), clang::ADLResult::erase(), ExtractSubobject(), getCanonicalDecl(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTContext::getCanonicalTemplateName(), HasSameBase(), clang::ADLResult::insert(), isCanonicalDecl(), IsEquivalentForUsingDecl(), isInCLinkageSpecification(), clang::OverloadCandidateSet::isNewCandidate(), isSameDeclaration(), isSameTemplate(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::Sema::LookupTemplateName(), MatchesFriend(), clang::idx::DeclReferenceMap::refs_begin(), clang::idx::DeclReferenceMap::refs_empty(), clang::idx::DeclReferenceMap::refs_end(), and clang::LookupResult::resolveKind().
| const Decl* clang::Decl::getCanonicalDecl | ( | ) | const [inline] |
Reimplemented in clang::EnumDecl, clang::TagDecl, clang::TypedefNameDecl, clang::CXXConstructorDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionDecl, clang::CXXMethodDecl, clang::ObjCProtocolDecl, clang::ObjCInterfaceDecl, clang::VarDecl, clang::FunctionTemplateDecl, clang::CXXRecordDecl, clang::RedeclarableTemplateDecl, clang::NamespaceDecl, and clang::ObjCMethodDecl.
Definition at line 655 of file DeclBase.h.
References getCanonicalDecl().
| DeclContext* clang::Decl::getDeclContext | ( | ) | [inline] |
Definition at line 352 of file DeclBase.h.
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnDeclarator(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnTag(), clang::Sema::ActOnTypedefNameDecl(), addAssociatedClassesAndNamespaces(), clang::Sema::AddFunctionCandidates(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddMethodCandidate(), clang::CodeGen::CodeGenTypes::addRecordTypeName(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildCXXDefaultArgExpr(), clang::Sema::BuildInstanceMessage(), CheckAddressOfOperand(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConstructor(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), clang::Sema::CheckDirectMemberAccess(), clang::Sema::CheckEquivalentExceptionSpec(), CheckExplicitInstantiationScope(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::checkInitMethod(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckObjCMethodOverride(), checkObjCUnusedIvar(), CheckOperatorNewDeleteDeclarationScope(), clang::Sema::CheckShadow(), clang::Sema::CheckTemplateArgument(), CheckTemplateSpecializationScope(), clang::Sema::CheckUsingShadowDecl(), ClassifyImplicitMemberAccess(), ClassifyMemberExpr(), computeBlockInfo(), computeCachedProperties(), computeDeclRefDependence(), clang::Sema::DefaultSynthesizeProperties(), DiagnoseAccessPath(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseInvalidRedeclaration(), diagnoseUncapturableValueReference(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::FindConversionForRefInit(), FindDeclaringClass(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), FormatFunctionParameter(), clang::CodeGen::CodeGenVTables::GenerateClassData(), getAssignmentAction(), clang::FunctionDecl::getBuiltinID(), clang::ObjCMethodDecl::getCanonicalDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCIvarDecl::getContainingInterface(), getDeclContext(), GetKeyForMember(), getLVForClassMember(), getLVForDecl(), getLVForNamespaceScopeDecl(), getNonClosureContext(), clang::ASTContext::getObjContainingInterface(), clang::FieldDecl::getParent(), getParentFunctionOrMethod(), clang::CodeCompletionResult::getPriorityFromDecl(), clang::NamedDecl::getQualifiedNameAsString(), GetStaticDeclName(), clang::Sema::getTemplateInstantiationArgs(), getTemplateKind(), getTranslationUnitDecl(), clang::ento::MemRegionManager::getVarRegion(), clang::Sema::HandleDelayedAccessCheck(), handleIBOutletCollection(), handleWeakRefAttr(), clang::Sema::HideUsingShadowDecl(), clang::ASTNodeImporter::ImportDeclParts(), InNamespace(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateStaticDataMemberDefinition(), isCharSpecialization(), clang::NamedDecl::isCXXClassMember(), isDeclDeprecated(), clang::IdentifierResolver::isDeclInScope(), clang::TemplateArgument::isDependent(), clang::VarDecl::isExternC(), clang::FunctionDecl::isExternC(), clang::VarDecl::isFileVarDecl(), isFunctionLocalClass(), clang::VarDecl::isFunctionOrMethodVarDecl(), clang::FunctionDecl::isGlobal(), isInAnonymousNamespace(), isInCLinkageSpecification(), clang::RecordDecl::isInjectedClassName(), clang::TemplateArgument::isInstantiationDependent(), clang::CXXRecordDecl::isLocalClass(), clang::VarDecl::isLocalVarDecl(), clang::FunctionDecl::isMain(), isOutOfLine(), isOutOfScopePreviousDeclaration(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), clang::VarDecl::isStaticDataMember(), clang::Sema::isStdInitializerList(), IsStructurallyEquivalent(), IsTailPaddedMemberArray(), isTrackedVar(), clang::IsUserDefinedConversion(), clang::CXXMethodDecl::isUsualDeallocationFunction(), IsWithinTemplateSpecialization(), clang::Sema::LookupOrCreateLabel(), clang::MangleContext::mangleBlock(), clang::MangleContext::mangleObjCMethodName(), clang::Sema::MarkFunctionReferenced(), MatchesFriend(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::mergeObjCMethodDecls(), clang::Sema::MergeVarDecl(), MightInstantiateTo(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrintInstantiationStack(), clang::Sema::PushOnScopeChains(), setLexicalDeclContext(), clang::FunctionDecl::setPure(), shouldAddConstQualToVarRef(), shouldBuildBlockDeclRef(), ShouldDiagnoseUnusedDecl(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::IdentifierResolver::tryAddTopLevelDecl(), clang::Sema::TryCaptureVar(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), clang::Sema::UseArgumentDependentLookup(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::ASTDeclWriter::VisitDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::idx::EntityGetter::VisitNamedDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), and clang::ASTNodeImporter::VisitObjCPropertyImplDecl().
| const DeclContext* clang::Decl::getDeclContext | ( | ) | const [inline] |
Definition at line 357 of file DeclBase.h.
References getDeclContext().
| const char * Decl::getDeclKindName | ( | ) | const |
Definition at line 63 of file DeclBase.cpp.
Referenced by clang::idx::ASTLocation::print(), clang::ASTNodeImporter::VisitDecl(), and clang::TemplateDeclInstantiator::VisitDecl().
| FriendObjectKind clang::Decl::getFriendObjectKind | ( | ) | const [inline] |
Determines whether this declaration is the object of a friend declaration and, if so, what kind.
There is currently no direct way to find the associated FriendDecl.
Definition at line 820 of file DeclBase.h.
References FOK_Declared, FOK_None, FOK_Undeclared, IDNS_Ordinary, IDNS_OrdinaryFriend, IDNS_Tag, and IDNS_TagFriend.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckMemberSpecialization(), clang::FriendDecl::Create(), clang::Sema::FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitFunctionTemplateDecl().
| unsigned clang::Decl::getGlobalID | ( | ) | const [inline] |
Retrieve the global declaration ID associated with this declaration, which specifies where in the.
Definition at line 577 of file DeclBase.h.
References isFromASTFile().
Referenced by clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), and clang::ASTReader::getOwningModuleFile().
| unsigned clang::Decl::getIdentifierNamespace | ( | ) | const [inline] |
Definition at line 592 of file DeclBase.h.
Referenced by clang::StoredDeclsList::AddSubsequentDecl(), clang::Sema::ArgumentDependentLookup(), CalculateHiddenNames(), clang::idx::EntityImpl::getDecl(), hasTagIdentifierNamespace(), isInIdentifierNamespace(), clang::UsingShadowDecl::setTargetDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::idx::EntityGetter::VisitNamedDecl(), clang::ASTDeclWriter::VisitRedeclarableTemplateDecl(), and clang::ASTDeclWriter::VisitTagDecl().
| unsigned Decl::getIdentifierNamespaceForKind | ( | Kind | DK | ) | [static] |
Definition at line 445 of file DeclBase.cpp.
References IDNS_Label, IDNS_Member, IDNS_Namespace, IDNS_ObjCProtocol, IDNS_Ordinary, IDNS_Tag, IDNS_Type, and IDNS_Using.
| Kind clang::Decl::getKind | ( | ) | const [inline] |
Definition at line 346 of file DeclBase.h.
Referenced by clang::Sema::BuildDeclarationNameExpr(), castToDeclContext(), clang::TranslationUnitDecl::classof(), clang::FriendDecl::classof(), clang::AccessSpecDecl::classof(), clang::TemplateDecl::classof(), clang::NamedDecl::classof(), clang::LabelDecl::classof(), clang::ObjCMethodDecl::classof(), clang::NamespaceDecl::classof(), clang::ValueDecl::classof(), clang::ObjCContainerDecl::classof(), clang::DeclaratorDecl::classof(), clang::RedeclarableTemplateDecl::classof(), clang::FunctionTemplateDecl::classof(), clang::TemplateTypeParmDecl::classof(), clang::ObjCInterfaceDecl::classof(), clang::ObjCIvarDecl::classof(), clang::ObjCAtDefsFieldDecl::classof(), clang::NonTypeTemplateParmDecl::classof(), clang::VarDecl::classof(), clang::ImplicitParamDecl::classof(), clang::TemplateTemplateParmDecl::classof(), clang::ObjCProtocolDecl::classof(), clang::ParmVarDecl::classof(), clang::ObjCCategoryDecl::classof(), clang::CXXRecordDecl::classof(), clang::ObjCImplDecl::classof(), clang::ClassTemplateSpecializationDecl::classof(), clang::DeclContext::classof(), clang::ObjCCategoryImplDecl::classof(), clang::CXXMethodDecl::classof(), clang::ClassTemplatePartialSpecializationDecl::classof(), clang::ObjCImplementationDecl::classof(), clang::ObjCCompatibleAliasDecl::classof(), clang::ObjCPropertyDecl::classof(), clang::ClassTemplateDecl::classof(), clang::FriendTemplateDecl::classof(), clang::ObjCPropertyImplDecl::classof(), clang::CXXConstructorDecl::classof(), clang::FunctionDecl::classof(), clang::TypeAliasTemplateDecl::classof(), clang::ClassScopeFunctionSpecializationDecl::classof(), clang::CXXDestructorDecl::classof(), clang::FieldDecl::classof(), clang::CXXConversionDecl::classof(), clang::EnumConstantDecl::classof(), clang::LinkageSpecDecl::classof(), clang::IndirectFieldDecl::classof(), clang::TypeDecl::classof(), clang::UsingDirectiveDecl::classof(), clang::TypedefNameDecl::classof(), clang::TypedefDecl::classof(), clang::TypeAliasDecl::classof(), clang::NamespaceAliasDecl::classof(), clang::UsingShadowDecl::classof(), clang::TagDecl::classof(), clang::UsingDecl::classof(), clang::UnresolvedUsingValueDecl::classof(), clang::UnresolvedUsingTypenameDecl::classof(), clang::StaticAssertDecl::classof(), clang::EnumDecl::classof(), clang::RecordDecl::classof(), clang::FileScopeAsmDecl::classof(), clang::BlockDecl::classof(), clang::ImportDecl::classof(), compareDeclarations(), clang::NamedDecl::declarationReplaces(), clang::CodeGen::CodeGenFunction::EmitDecl(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCIvarDecl::getContainingInterface(), clang::Sema::getCopyElisionCandidate(), clang::getCursorKindForDecl(), getLVForDecl(), clang::VarDecl::isFileVarDecl(), clang::VarDecl::isFunctionOrMethodVarDecl(), isInstantiationOf(), clang::VarDecl::isLocalVarDecl(), isSameEntity(), clang::VarDecl::isStaticDataMember(), IsStructurallyEquivalent(), isTemplateParameter(), MatchTemplateParameterKind(), clang::ento::CheckerManager::runCheckersOnASTDecl(), setNonMemberOperator(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::DeclVisitor< ImplClass >::Visit(), clang::CFGRecStmtDeclVisitor< ImplClass >::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclReader::VisitRedeclarableTemplateDecl(), and clang::ASTDeclReader::VisitVarDecl().
| DeclContext* clang::Decl::getLexicalDeclContext | ( | ) | [inline] |
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC). May be different from getDeclContext() (SemanticDC). e.g.:
namespace A { void f(); // SemanticDC == LexicalDC == 'namespace A' } void A::f(); // SemanticDC == namespace 'A' LexicalDC == global namespace
Definition at line 618 of file DeclBase.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnStartOfFunctionDef(), clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::ArgumentDependentLookup(), clang::Sema::FinishTemplateArgumentDeduction(), getLexicalDeclContext(), getLVForDecl(), clang::Sema::getTemplateInstantiationArgs(), clang::ASTNodeImporter::ImportDeclParts(), isOutOfLine(), clang::Sema::MergeVarDecl(), clang::Sema::PushOnScopeChains(), RedeclForcesDefC99(), clang::Sema::RegisterLocallyScopedExternCDecl(), clang::DeclContext::removeDecl(), setLexicalDeclContext(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| const DeclContext* clang::Decl::getLexicalDeclContext | ( | ) | const [inline] |
Definition at line 623 of file DeclBase.h.
References getLexicalDeclContext().
| SourceLocation clang::Decl::getLocation | ( | ) | const [inline] |
Definition at line 343 of file DeclBase.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCompatiblityAlias(), clang::Sema::ActOnCompoundStmt(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnDefs(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForwardClassDeclaration(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnLabelStmt(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnNamespaceAliasDef(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnStartProtocolInterface(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddCXXDirectInitializerToDecl(), clang::ASTUnit::addFileLevelDecl(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AtomicPropertySetterGetterRules(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXDefaultArgExpr(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclRefExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemberReferenceExpr(), clang::CodeGen::CGCXXABI::BuildThisParam(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), CheckAnonMemberRedeclaration(), checkARCPropertyDecl(), checkARCPropertyImpl(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprFunction(), clang::Sema::CheckConstexprFunctionBody(), clang::Sema::CheckConstexprFunctionDecl(), CheckConstexprParameterTypes(), clang::Sema::CheckConstructor(), clang::Sema::CheckCXXDefaultArguments(), clang::Sema::CheckDestructor(), clang::Sema::CheckEquivalentExceptionSpec(), CheckExplicitInstantiationScope(), clang::Sema::CheckExplicitlyDefaultedCopyAssignment(), clang::Sema::CheckExplicitlyDefaultedCopyConstructor(), clang::Sema::CheckExplicitlyDefaultedDefaultConstructor(), clang::Sema::CheckExplicitlyDefaultedDestructor(), clang::Sema::CheckExplicitlyDefaultedMoveAssignment(), clang::Sema::CheckExplicitlyDefaultedMoveConstructor(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::CheckFieldDecl(), CheckForDanglingReferenceOrPointer(), clang::Sema::CheckForFunctionRedefinition(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), clang::Sema::checkInitMethod(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckMain(), clang::Sema::CheckMemberSpecialization(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::Sema::CheckNontrivialField(), CheckNonTypeClassTemplatePartialSpecializationArgs(), clang::Sema::CheckObjCDeclScope(), clang::Sema::CheckObjCMethodOverride(), checkObjCUnusedIvar(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckParmsForFunctionDef(), CheckPoppedLabel(), clang::Sema::CheckProtocolMethodDefs(), clang::Sema::CheckPureMethod(), clang::Sema::CheckShadow(), clang::Sema::CheckSpecializationInstantiationRedecl(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTemplateParameterList(), CheckTemplateSpecializationScope(), clang::Sema::CheckTemplateTypeArgument(), CheckTrivialDefaultConstructor(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckTypenameType(), checkUndefinedInternals(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::CheckVariableDeclaration(), clang::Sema::CompareMethodParamsInBaseAndSuper(), ConvertDeducedTemplateArgument(), clang::Sema::ConvertToIntegralOrEnumerationType(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeclareInheritedConstructors(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineUsedVTables(), DelegatingCycleHelper(), clang::InitializationSequence::Diagnose(), DiagnoseAccessPath(), clang::Sema::DiagnoseAmbiguousLookup(), diagnoseArityMismatch(), clang::Sema::DiagnoseAutoDeductionFailure(), clang::Sema::DiagnoseAvailabilityOfDecl(), DiagnoseCalleeStaticArrayParam(), clang::Sema::DiagnoseClassExtensionDupMethods(), clang::Sema::DiagnoseDuplicateIvars(), clang::Sema::DiagnoseHiddenVirtualMethods(), DiagnoseInvalidRedeclaration(), clang::Sema::DiagnoseNontrivial(), DiagnoseObjCImplementedDeprecations(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::Sema::DiagnoseTemplateParameterShadow(), diagnoseUncapturableValueReference(), clang::Sema::DiagnoseUnimplementedProperties(), DiagnoseUninitializedUse(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::DiagnoseUnusedDecl(), clang::Sema::DiagnoseUseOfDecl(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::Sema::EmitDeprecationWarning(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::Sema::EmitRelatedResultTypeNote(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), ErrorUnsupportedABI(), EvaluateVarDeclInit(), clang::Sema::FinalizeVarWithDestructor(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindDeallocationFunction(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FindProtocolDeclaration(), FinishTemplateArgumentDeduction(), clang::Sema::FinishTemplateArgumentDeduction(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::AccessSpecDecl::getAccessSpecifierLoc(), clang::NamespaceAliasDecl::getAliasLoc(), clang::FileScopeAsmDecl::getAsmLoc(), clang::BlockDecl::getCaretLocation(), GetDeclSpecTypeForDeclarator(), clang::Sema::getDestructorName(), clang::ObjCInterfaceDecl::getEndOfDefinitionLoc(), GetFullTypeForDeclarator(), clang::UsingDirectiveDecl::getIdentLocation(), getInitializationLoc(), clang::LinkageSpecDecl::getLocEnd(), clang::ObjCMethodDecl::getLocStart(), clang::Sema::getMoreSpecializedPartialSpecialization(), clang::FunctionDecl::getNameInfo(), clang::UsingDecl::getNameInfo(), clang::UnresolvedUsingValueDecl::getNameInfo(), clang::Sema::getObjCInterfaceDecl(), clang::CXXCtorInitializer::getSourceLocation(), clang::ASTReader::getSourceLocationForDeclID(), clang::FriendDecl::getSourceRange(), clang::ObjCMethodDecl::getSourceRange(), getSourceRange(), clang::LabelDecl::getSourceRange(), clang::DeclaratorDecl::getSourceRange(), clang::ObjCInterfaceDecl::getSourceRange(), clang::TemplateTemplateParmDecl::getSourceRange(), clang::ObjCProtocolDecl::getSourceRange(), clang::ObjCPropertyDecl::getSourceRange(), clang::ObjCPropertyImplDecl::getSourceRange(), clang::EnumConstantDecl::getSourceRange(), clang::TypeDecl::getSourceRange(), clang::UsingDirectiveDecl::getSourceRange(), clang::TypedefDecl::getSourceRange(), clang::TagDecl::getSourceRange(), clang::StaticAssertDecl::getSourceRange(), clang::BlockDecl::getSourceRange(), clang::ImportDecl::getSourceRange(), clang::Sema::getTypeName(), clang::ento::MemRegionManager::getVarRegion(), handleCleanupAttr(), clang::Sema::HandleExprPropertyRefExpr(), handleFormatAttr(), HandleLValueToRValueConversion(), handleModeAttr(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), clang::Sema::HandlePropertyInClassExtension(), handleTransparentUnionAttr(), clang::Sema::ImplicitlyDefineFunction(), clang::Sema::ImplMethodsVsClassMethods(), clang::ASTNodeImporter::ImportDeclParts(), clang::ASTNodeImporter::ImportDefinition(), clang::Sema::inferObjCARCLifetime(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::Sema::InitializeVarWithConstructor(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::isAcceptableTagRedeclaration(), isForbiddenTypeAllowed(), clang::LabelDecl::isGnuLocal(), clang::Sema::isIncompatibleTypedef(), clang::Sema::IsOverload(), clang::Expr::isPotentialConstantExpr(), IsStructurallyEquivalent(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), clang::Sema::LookupMemberExpr(), LookupStdInitializerList(), clang::Sema::LookupTemplateName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MatchAllMethodDeclarations(), MatchTemplateParameterKind(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::MergeVarDeclTypes(), clang::Sema::NoteOverloadCandidate(), noteOverloads(), clang::Sema::ParseTypedefDecl(), clang::Sema::PerformPendingInstantiations(), clang::PrettyStackTraceDecl::print(), clang::Sema::ProcessPropertyDecl(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildObjCExceptionDecl(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), clang::Sema::RequireCompleteType(), clang::Sema::RequireLiteralType(), clang::Sema::SetCtorInitializers(), clang::Sema::SetIvarInitializers(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::SetParamDefaultArgument(), clang::Sema::ShouldDeleteCopyAssignmentOperator(), clang::Sema::ShouldDeleteDestructor(), clang::Sema::ShouldDeleteMoveAssignmentOperator(), clang::Sema::ShouldDeleteSpecialMember(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::Sema::TryCaptureVar(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitDecl(), clang::TemplateDeclInstantiator::VisitDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFriendDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), clang::TemplateDeclInstantiator::VisitLabelDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::TemplateDeclInstantiator::VisitStaticAssertDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), clang::TemplateDeclInstantiator::VisitTemplateTypeParmDecl(), clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(), clang::TemplateDeclInstantiator::VisitUnresolvedUsingTypenameDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), clang::TemplateDeclInstantiator::VisitUsingDirectiveDecl(), clang::TemplateDeclInstantiator::VisitVarDecl(), clang::Sema::WarnConflictingTypedMethods(), clang::Sema::WarnExactTypedMethods(), and clang::Sema::WarnUndefinedMethod().
| SourceLocation clang::Decl::getLocEnd | ( | ) | const [inline] |
Reimplemented in clang::LinkageSpecDecl, and clang::ObjCMethodDecl.
Definition at line 341 of file DeclBase.h.
References clang::SourceRange::getEnd(), and getSourceRange().
Referenced by clang::CodeGen::CodeGenFunction::EmitConstructorBody(), GenerateFixForUnusedDecl(), clang::VarDecl::getSourceRange(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), SuggestInitializationFixit(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTDeclWriter::VisitImportDecl().
| SourceLocation clang::Decl::getLocStart | ( | ) | const [inline] |
Reimplemented in clang::TypeDecl, clang::ObjCPropertyImplDecl, clang::NamespaceDecl, and clang::ObjCMethodDecl.
Definition at line 340 of file DeclBase.h.
References clang::SourceRange::getBegin(), and getSourceRange().
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXNew(), clang::Sema::CheckExplicitlyDefaultedCopyConstructor(), clang::Sema::CheckExplicitlyDefaultedDefaultConstructor(), clang::Sema::CheckExplicitlyDefaultedMoveConstructor(), compare_vd_entries(), clang::Sema::ConvertArgumentsForCall(), clang::ento::PathDiagnosticLocation::createBegin(), DiagnoseUninitializedUse(), GenerateFixForUnusedDecl(), clang::TagDecl::getInnerLocStart(), handleCFTransferAttr(), handleNSBridgedAttr(), handleNSConsumedAttr(), handleNSConsumesSelfAttr(), handleNSReturnsRetainedAttr(), handleObjCOwnershipAttr(), handleObjCPreciseLifetimeAttr(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), and clang::ASTDeclWriter::VisitLabelDecl().
| unsigned clang::Decl::getMaxAlignment | ( | ) | const [inline] |
getMaxAlignment - return the maximum alignment specified by attributes on this decl, 0 if there are none.
Definition at line 453 of file DeclBase.h.
References getASTContext(), getAttrs(), clang::getMaxAttrAlignment(), and hasAttrs().
Referenced by clang::ASTContext::getDeclAlign(), clang::ASTContext::getTypeInfo(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
| Decl* clang::Decl::getMostRecentDecl | ( | ) | [inline] |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration).
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::ClassTemplatePartialSpecializationDecl, clang::ClassTemplateSpecializationDecl, and clang::CXXRecordDecl.
Definition at line 739 of file DeclBase.h.
References getMostRecentDeclImpl().
| const Decl* clang::Decl::getMostRecentDecl | ( | ) | const [inline] |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration).
Reimplemented in clang::RecordDecl, clang::EnumDecl, and clang::CXXRecordDecl.
Definition at line 743 of file DeclBase.h.
References getMostRecentDeclImpl().
| virtual Decl* clang::Decl::getMostRecentDeclImpl | ( | ) | [inline, protected, virtual] |
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.
Reimplemented in clang::TagDecl, clang::TypedefNameDecl, clang::FunctionDecl, and clang::VarDecl.
Definition at line 675 of file DeclBase.h.
Referenced by getMostRecentDecl().
| Decl* clang::Decl::getNextDeclInContext | ( | ) | [inline] |
Definition at line 349 of file DeclBase.h.
References NextInContextAndBits.
Referenced by clang::DeclContext::addHiddenDecl(), FindIndirectFieldDesignator(), IsTailPaddedMemberArray(), clang::DeclContext::localUncachedLookup(), and clang::DeclContext::decl_iterator::operator++().
| const Decl* clang::Decl::getNextDeclInContext | ( | ) | const [inline] |
Definition at line 350 of file DeclBase.h.
References NextInContextAndBits.
| virtual Decl* clang::Decl::getNextRedeclaration | ( | ) | [inline, protected, virtual] |
Returns the next redeclaration or itself if this is the only decl.
Decl subclasses that can be redeclared should override this method so that Decl::redecl_iterator can iterate over them.
Reimplemented in clang::TagDecl, clang::TypedefNameDecl, clang::FunctionDecl, and clang::VarDecl.
Definition at line 667 of file DeclBase.h.
Referenced by clang::Decl::redecl_iterator::operator++().
| DeclContext * Decl::getNonClosureContext | ( | ) |
Finds the innermost non-closure context of this declaration. That is, walk out the DeclContext chain, skipping any blocks.
Definition at line 666 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::getNonClosureAncestor().
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), and getNonClosureContext().
| const DeclContext* clang::Decl::getNonClosureContext | ( | ) | const [inline] |
Definition at line 364 of file DeclBase.h.
References getNonClosureContext().
| unsigned clang::Decl::getOwningModuleID | ( | ) | const [inline] |
Retrieve the global ID of the module that owns this particular declaration.
Definition at line 585 of file DeclBase.h.
References isFromASTFile().
| const DeclContext * Decl::getParentFunctionOrMethod | ( | ) | const |
If this decl is defined inside a function/method/block it returns the corresponding DeclContext, otherwise it returns null.
Definition at line 158 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::isTranslationUnit().
Referenced by getParentFunctionOrMethod(), and isDefinedOutsideFunctionOrMethod().
| DeclContext* clang::Decl::getParentFunctionOrMethod | ( | ) | [inline] |
Definition at line 648 of file DeclBase.h.
References getParentFunctionOrMethod().
| Decl* clang::Decl::getPreviousDecl | ( | ) | [inline] |
Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionTemplateDecl, and clang::CXXRecordDecl.
Definition at line 729 of file DeclBase.h.
References getPreviousDeclImpl().
Referenced by clang::Sema::CheckSpecializationInstantiationRedecl(), DiagnoseAccessPath(), and clang::LocalInstantiationScope::findInstantiationOf().
| const Decl* clang::Decl::getPreviousDecl | ( | ) | const [inline] |
Retrieve the most recent declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionTemplateDecl, and clang::CXXRecordDecl.
Definition at line 733 of file DeclBase.h.
References getPreviousDeclImpl().
| virtual Decl* clang::Decl::getPreviousDeclImpl | ( | ) | [inline, protected, virtual] |
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Reimplemented in clang::TagDecl, clang::TypedefNameDecl, clang::FunctionDecl, and clang::VarDecl.
Definition at line 671 of file DeclBase.h.
Referenced by getPreviousDecl().
| virtual SourceRange clang::Decl::getSourceRange | ( | ) | const [inline, virtual] |
Source range that this declaration covers.
Reimplemented in clang::ImportDecl, clang::BlockDecl, clang::FileScopeAsmDecl, clang::StaticAssertDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::NamespaceAliasDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::UsingDirectiveDecl, clang::TypeDecl, clang::LinkageSpecDecl, clang::EnumConstantDecl, clang::FieldDecl, clang::ObjCPropertyImplDecl, clang::ObjCPropertyDecl, clang::FunctionDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCProtocolDecl, clang::ParmVarDecl, clang::TemplateTemplateParmDecl, clang::NonTypeTemplateParmDecl, clang::TemplateTypeParmDecl, clang::VarDecl, clang::ObjCInterfaceDecl, clang::DeclaratorDecl, clang::ObjCContainerDecl, clang::NamespaceDecl, clang::LabelDecl, clang::ObjCMethodDecl, clang::TemplateDecl, clang::AccessSpecDecl, and clang::FriendDecl.
Definition at line 337 of file DeclBase.h.
References getLocation().
Referenced by ConvertDeducedTemplateArgument(), getLocEnd(), getLocStart(), clang::idx::ASTLocation::getSourceRange(), and clang::TemplateDecl::getSourceRange().
| TranslationUnitDecl * Decl::getTranslationUnitDecl | ( | ) |
Definition at line 226 of file DeclBase.cpp.
References getDeclContext(), clang::DeclContext::getParent(), and clang::DeclContext::isTranslationUnit().
Referenced by clang::Sema::ActOnPredefinedExpr(), getASTContext(), getTranslationUnitDecl(), and clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().
| const TranslationUnitDecl* clang::Decl::getTranslationUnitDecl | ( | ) | const [inline] |
Definition at line 369 of file DeclBase.h.
References getTranslationUnitDecl().
| bool clang::Decl::hasAttr | ( | ) | const [inline] |
Definition at line 447 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFinishNamespaceDef(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPragmaWeakAlias(), clang::Sema::AddCFAuditedAttribute(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), AllowOverloadingOfFunction(), BuildBlockDeclRefExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildResolvedCallExpr(), CanCalleeThrow(), canDevirtualizeMemberFunctionCall(), canDevirtualizeMemberFunctionCalls(), canRedefineFunction(), CheckARCMethodDecl(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckTransparentUnionArgumentConstraints(), checkUndefinedInternals(), clang::Sema::CheckVariableDeclaration(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CodeGen::CodeGenFunction::CreateStaticVarDecl(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnoseUnimplementedProperties(), clang::Sema::DiagnoseUseOfDecl(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::ASTContext::getBlockVarCopyInits(), clang::CodeGen::CodeGenModule::getBuiltinLibFunction(), getCallingConventionForDecl(), clang::Sema::getCopyElisionCandidate(), clang::ASTContext::getDeclAlign(), clang::FieldDecl::getFieldIndex(), GetFullTypeForDeclarator(), clang::CodeGen::CodeGenTypes::getFunctionInfo(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), clang::ASTContext::GetGVALinkageForFunction(), clang::CodeGen::CodeGenModule::GetLLVMLinkageVarDefinition(), getTypeInfoLinkage(), hasObjCExceptionAttribute(), clang::Sema::IdentifyCUDATarget(), clang::InitializedEntity::InitializeParameter(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::ObjCInterfaceDecl::isArcWeakrefUnavailable(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), clang::IsTransparentUnionStandardConversion(), clang::Sema::makeUnavailableInSystemHeader(), clang::Sema::MatchTwoMethodDeclarations(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mergeTransparentUnionType(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), clang::ASTContext::setBlockVarCopyInits(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), shouldAddConstForScope(), shouldAddConstQualToVarRef(), shouldConsiderTemplateLV(), ShouldDiagnoseUnusedDecl(), shouldExtendReceiverForInnerPointerMessage(), clang::CodeGen::CodeGenFunction::ShouldInstrumentFunction(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), clang::Sema::TryCaptureVar(), clang::Sema::WarnExactTypedMethods(), and clang::Sema::WarnUndefinedMethod().
| bool clang::Decl::hasAttrs | ( | ) | const [inline] |
Definition at line 391 of file DeclBase.h.
Referenced by clang::Sema::ActOnMethodDeclaration(), addAttr(), attr_begin(), attr_end(), containsInvalidMethodImplAttribute(), getAttr(), getMaxAlignment(), hasAttr(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
| virtual bool clang::Decl::hasBody | ( | ) | const [inline, virtual] |
Returns true if this Decl represents a declaration for a body of code, such as a function or method definition.
Reimplemented in clang::FunctionDecl.
Definition at line 754 of file DeclBase.h.
References getBody().
Referenced by cleanupDeallocOrFinalize(), GCRewriteFinalize(), clang::FunctionDecl::hasBody(), and clang::ento::CheckerManager::runCheckersOnASTBody().
| bool clang::Decl::hasTagIdentifierNamespace | ( | ) | const [inline] |
Definition at line 600 of file DeclBase.h.
References getIdentifierNamespace(), and isTagIdentifierNamespace().
Referenced by clang::StoredDeclsList::AddSubsequentDecl().
| bool clang::Decl::isCanonicalDecl | ( | ) | const [inline] |
Whether this particular Decl is a canonical one.
Definition at line 660 of file DeclBase.h.
References getCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod(), clang::ASTDeclWriter::VisitClassTemplateSpecializationDecl(), clang::ASTDeclReader::VisitClassTemplateSpecializationDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), and clang::ASTDeclReader::VisitFunctionDecl().
| bool clang::Decl::isDefinedOutsideFunctionOrMethod | ( | ) | const [inline] |
isDefinedOutsideFunctionOrMethod - This predicate returns true if this scoped decl is defined outside the current function or method. This is roughly global variables and functions, but also handles enums (which could be defined inside or outside a function etc).
Definition at line 641 of file DeclBase.h.
References getParentFunctionOrMethod().
Referenced by clang::Sema::InstantiateClass(), clang::Sema::LookupInObjCMethod(), and LookupPotentialTypoResult().
| bool clang::Decl::isDeprecated | ( | std::string * | Message = 0 | ) | const [inline] |
Determine whether this declaration is marked 'deprecated'.
| Message | If non-NULL and the declaration is deprecated, this will be set to the message describing why the declaration was deprecated (which may be empty). |
Definition at line 542 of file DeclBase.h.
References clang::AR_Deprecated, and getAvailability().
Referenced by clang::Sema::addMethodToGlobalList(), DiagnoseObjCImplementedDeprecations(), and isDeclDeprecated().
| bool clang::Decl::isFromASTFile | ( | ) | const [inline] |
Determine whether this declaration came from an AST file (such as a precompiled header or module) rather than having been parsed.
Definition at line 573 of file DeclBase.h.
References FromASTFile.
Referenced by clang::ASTWriter::AddedCXXImplicitMember(), clang::ASTWriter::AddedCXXTemplateSpecialization(), clang::ASTContext::addedLocalImportDecl(), clang::ASTWriter::AddedObjCCategoryToInterface(), clang::ASTWriter::AddedObjCPropertyInClassExtension(), clang::ASTWriter::AddedVisibleDecl(), clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), clang::ASTWriter::CompletedImplicitDefinition(), clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), getGlobalID(), clang::ASTReader::getOwningModuleFile(), getOwningModuleID(), setOwningModuleID(), clang::ASTWriter::StaticDataMemberInstantiated(), and clang::ASTDeclWriter::VisitNamespaceDecl().
| bool Decl::isFunctionOrFunctionTemplate | ( | ) | const |
Whether this declaration is a function or function template.
Definition at line 147 of file DeclBase.cpp.
Referenced by clang::Sema::CheckUsingShadowDecl().
| bool clang::Decl::isImplicit | ( | ) | const [inline] |
isImplicit - Indicates whether the declaration was implicitly generated by the implementation. If false, this declaration was written explicitly in the source code.
Definition at line 465 of file DeclBase.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::ASTWriter::AddedCXXImplicitMember(), clang::Sema::BuildCXXNew(), BuildImplicitMemberInitializer(), CheckAbstractClassUsage(), clang::Sema::CheckDestructor(), clang::Sema::CheckParmsForFunctionDef(), clang::InitializationSequence::Diagnose(), clang::CodeGen::CodeGenFunction::EmitDestructorBody(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), clang::ObjCMethodDecl::getNumSelectorLocs(), clang::ObjCMethodDecl::getSelectorStartLoc(), clang::Sema::IdentifyCUDATarget(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::ObjCInterfaceDecl::isImplicitInterfaceDecl(), clang::RecordDecl::isInjectedClassName(), clang::Sema::MergeFunctionDecl(), RedeclForcesDefC99(), clang::ObjCMethodDecl::setMethodParams(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::Sema::UseArgumentDependentLookup(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
| bool Decl::isInAnonymousNamespace | ( | ) | const |
Definition at line 215 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::getParent().
Referenced by getLVForNamespaceScopeDecl().
| bool clang::Decl::isInIdentifierNamespace | ( | unsigned | NS | ) | const [inline] |
Definition at line 595 of file DeclBase.h.
References getIdentifierNamespace().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::CXXRecordDecl::FindNestedNameSpecifierMember(), clang::LookupResult::getAcceptableDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool clang::Decl::isInvalidDecl | ( | ) | const [inline] |
Definition at line 460 of file DeclBase.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnCXXExitDeclInitializer(), clang::Sema::ActOnCXXForRangeStmt(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishDelayedCXXMethodDeclaration(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnObjCAtCatchStmt(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::BuildDeclarationNameExpr(), BuildImplicitMemberInitializer(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildUsingShadowDecl(), CanDeclareSpecialMemberFunction(), checkARCPropertyDecl(), checkARCPropertyImpl(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), CheckConstexprFunction(), clang::Sema::CheckConstructor(), clang::Sema::CheckCXXDefaultArguments(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), checkMethodFamilyMismatch(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CheckPureMethod(), clang::Sema::CheckTemplateIdType(), checkUndefinedInternals(), clang::Sema::CheckVariableDeclaration(), CollectFieldInitializer(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpecAndConst(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(), clang::Sema::ComputeDefaultedDefaultCtorExceptionSpec(), clang::Sema::ComputeDefaultedDtorExceptionSpec(), clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedMoveCtorExceptionSpec(), ConvertDeclSpecToType(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), DelegatingCycleHelper(), clang::Sema::DiagnoseDuplicateIvars(), clang::Sema::DiagnoseUnimplementedProperties(), clang::Sema::FinalizeVarWithDestructor(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ASTContext::getTypeInfo(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), HandleLValueToRValueConversion(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateStaticDataMemberDefinition(), clang::FunctionDecl::isImplicitlyInstantiable(), isNonPlacementDeallocationFunction(), clang::IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), clang::Sema::LookupInObjCMethod(), clang::Sema::LookupMemberExpr(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), MatchesFriend(), clang::CXXRecordDecl::mayBeAbstract(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclTypes(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::PerformPendingInstantiations(), clang::Sema::DelayedDiagnostics::popParsingDecl(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), clang::Sema::RequireCompleteType(), ResolveConstructorOverload(), clang::Sema::SetDeclDefaulted(), clang::Sema::SetIvarInitializers(), clang::Sema::ShouldDeleteCopyAssignmentOperator(), clang::Sema::ShouldDeleteDestructor(), clang::Sema::ShouldDeleteMoveAssignmentOperator(), clang::Sema::ShouldDeleteSpecialMember(), ShouldDiagnoseUnusedDecl(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::Sema::SubstDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), TryRefInitWithConversionFunction(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| bool clang::Decl::isModulePrivate | ( | ) | const [inline, protected] |
Whether this declaration was marked as being private to the module in which it was defined.
Definition at line 502 of file DeclBase.h.
References ModulePrivateFlag, and NextInContextAndBits.
Referenced by clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclReader::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
| virtual bool clang::Decl::isOutOfLine | ( | ) | const [inline, virtual] |
Reimplemented in clang::FunctionDecl, and clang::VarDecl.
Definition at line 627 of file DeclBase.h.
References getDeclContext(), and getLexicalDeclContext().
Referenced by clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnCXXExitDeclInitializer(), DiagnoseAccessPath(), clang::VarDecl::isOutOfLine(), clang::FunctionDecl::isOutOfLine(), clang::Sema::PushOnScopeChains(), and clang::TemplateDeclInstantiator::VisitClassTemplateDecl().
| bool Decl::isParameterPack | ( | ) | const |
Whether this declaration is a parameter pack.
Reimplemented in clang::ParmVarDecl, clang::TemplateTemplateParmDecl, clang::NonTypeTemplateParmDecl, and clang::TemplateTypeParmDecl.
Definition at line 140 of file DeclBase.cpp.
References isTemplateParameterPack().
Referenced by clang::Sema::ActOnSizeofParameterPackExpr(), clang::FunctionDecl::getMinRequiredArguments(), and MatchTemplateParameterKind().
| bool Decl::isReferenced | ( | ) | const |
Whether this declaration was referenced.
Definition at line 266 of file DeclBase.cpp.
References redecls_begin(), and redecls_end().
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), ShouldDiagnoseUnusedDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| static bool clang::Decl::isTagIdentifierNamespace | ( | unsigned | NS | ) | [inline, static] |
Definition at line 603 of file DeclBase.h.
References IDNS_Tag, IDNS_TagFriend, and IDNS_Type.
Referenced by hasTagIdentifierNamespace().
| bool Decl::isTemplateDecl | ( | ) | const |
returns true if this declaration is a template
Definition at line 154 of file DeclBase.cpp.
| bool clang::Decl::isTemplateParameter | ( | ) | const [inline] |
isTemplateParameter - Determines whether this declaration is a template parameter.
Definition at line 1511 of file DeclBase.h.
References getKind().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnForwardClassDeclaration(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTag(), clang::Sema::ActOnTypeParameter(), clang::Sema::CheckClassTemplate(), clang::Sema::DiagnoseTemplateParameterShadow(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), clang::ASTDeclReader::Visit(), and clang::ASTDeclReader::VisitDecl().
| bool Decl::isTemplateParameterPack | ( | ) | const |
isTemplateParameter - Determines whether this declaration is a template parameter pack.
Definition at line 128 of file DeclBase.cpp.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::FinishTemplateArgumentDeduction(), isParameterPack(), and MatchTemplateParameterKind().
| bool clang::Decl::isTopLevelDeclInObjCContainer | ( | ) | const [inline] |
Whether this declaration is a top-level declaration (function, global variable, etc.) that is lexically inside an objc container definition.
Definition at line 486 of file DeclBase.h.
References NextInContextAndBits, and TopLevelDeclInObjCContainerFlag.
Referenced by clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
| bool clang::Decl::isUnavailable | ( | std::string * | Message = 0 | ) | const [inline] |
Determine whether this declaration is marked 'unavailable'.
| Message | If non-NULL and the declaration is unavailable, this will be set to the message describing why the declaration was made unavailable (which may be empty). |
Definition at line 551 of file DeclBase.h.
References clang::AR_Unavailable, and getAvailability().
Referenced by clang::Sema::addMethodToGlobalList(), and clang::Sema::isFunctionConsideredUnavailable().
| bool Decl::isUsed | ( | bool | CheckUsedAttr = true | ) | const |
Whether this declaration was used, meaning that a definition is required.
| CheckUsedAttr | When true, also consider the "used" attribute (in addition to the "used" bit set by setUsed()) when determining whether the function is used. |
Definition at line 249 of file DeclBase.cpp.
References redecls_begin(), and redecls_end().
Referenced by clang::Sema::ActOnPragmaUnused(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::Sema::MarkFunctionReferenced(), PerformConstructorInitialization(), clang::CodeGen::CodeGenFunction::PushDestructorCleanup(), ShouldDiagnoseUnusedDecl(), ShouldRemoveFromUnused(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| bool Decl::isWeakImported | ( | ) | const |
Determine whether this is a weak-imported symbol.
Weak-imported symbols are typically marked with the 'weak_import' attribute, but may also be marked with an 'availability' attribute where we're targing a platform prior to the introduction of this feature.
Definition at line 426 of file DeclBase.cpp.
References clang::AR_NotYetIntroduced, attr_begin(), attr_end(), canBeWeakImported(), CheckAvailability(), and getASTContext().
Referenced by clang::ValueDecl::isWeak().
| void Decl::print | ( | raw_ostream & | Out, |
| unsigned | Indentation = 0, |
||
| bool | PrintInstantiation = false |
||
| ) | const |
Definition at line 92 of file DeclPrinter.cpp.
References getASTContext().
Referenced by dump(), print_block(), and printGroup().
| void Decl::print | ( | raw_ostream & | Out, |
| const PrintingPolicy & | Policy, | ||
| unsigned | Indentation = 0, |
||
| bool | PrintInstantiation = false |
||
| ) | const |
Definition at line 97 of file DeclPrinter.cpp.
References getASTContext().
| void Decl::printGroup | ( | Decl ** | Begin, |
| unsigned | NumDecls, | ||
| raw_ostream & | Out, | ||
| const PrintingPolicy & | Policy, | ||
| unsigned | Indentation = 0 |
||
| ) | [static] |
Definition at line 131 of file DeclPrinter.cpp.
References clang::TagDecl::isCompleteDefinition(), print(), clang::PrintingPolicy::SuppressSpecifiers, and clang::PrintingPolicy::SuppressTag.
| void Decl::PrintStats | ( | ) | [static] |
Definition at line 96 of file DeclBase.cpp.
Referenced by clang::ParseAST().
| redecl_iterator clang::Decl::redecls_begin | ( | ) | const [inline] |
Returns iterator for all the redeclarations of the same decl. It will iterate at least once (when this decl is the only one).
Definition at line 722 of file DeclBase.h.
Referenced by compareDeclarations(), getVisibleDecl(), isReferenced(), and isUsed().
| redecl_iterator clang::Decl::redecls_end | ( | ) | const [inline] |
Definition at line 725 of file DeclBase.h.
Referenced by compareDeclarations(), getVisibleDecl(), isReferenced(), and isUsed().
| void clang::Decl::setAccess | ( | AccessSpecifier | AS | ) | [inline] |
Definition at line 377 of file DeclBase.h.
References Access.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::BuildAnonymousStructOrUnion(), clang::ASTContext::BuildByRefType(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeclareInheritedConstructors(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::ASTContext::getBlockDescriptorExtendedType(), clang::ASTContext::getBlockDescriptorType(), clang::ASTContext::getCFConstantStringType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), InjectAnonymousStructOrUnionMembers(), clang::Sema::MergeVarDecl(), setInvalidDecl(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::TryCaptureVar(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::ASTDeclReader::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFriendDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionTemplateDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::TemplateDeclInstantiator::VisitTemplateTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitTemplateTypeParmDecl(), clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| void Decl::setAttrs | ( | const AttrVec & | Attrs | ) |
Definition at line 535 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getDeclAttrs().
Referenced by addAttr(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), and clang::ASTDeclReader::VisitDecl().
| void Decl::setDeclContext | ( | DeclContext * | DC | ) |
setDeclContext - Set both the semantic and lexical DeclContext to DC.
Definition at line 197 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::ParmVarDecl::setOwningFunction(), clang::Sema::SubstParmVarDecl(), clang::ASTDeclReader::Visit(), and clang::ASTDeclReader::VisitDecl().
| void clang::Decl::setImplicit | ( | bool | I = true | ) | [inline] |
Definition at line 466 of file DeclBase.h.
Referenced by clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildParmVarDeclForTypedef(), clang::ImportDecl::CreateImplicit(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::getOrCreateStdNamespace(), clang::Sema::ImplicitlyDefineFunction(), clang::ImplicitParamDecl::ImplicitParamDecl(), InjectAnonymousStructOrUnionMembers(), clang::Sema::LazilyCreateBuiltin(), clang::Sema::MergeFunctionDecl(), clang::Sema::TryCaptureVar(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::ASTDeclReader::VisitDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), and clang::TemplateDeclInstantiator::VisitIndirectFieldDecl().
| void Decl::setInvalidDecl | ( | bool | Invalid = true | ) |
setInvalidDecl - Indicates the Decl had a semantic error. This allows for graceful error recovery.
Definition at line 72 of file DeclBase.cpp.
References clang::AS_public, and setAccess().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnCXXInClassMemberInitializer(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnParamDefaultArgument(), clang::Sema::ActOnParamDefaultArgumentError(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagDefinitionError(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddCXXDirectInitializerToDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckConstructor(), clang::Sema::CheckExplicitlyDefaultedCopyAssignment(), clang::Sema::CheckExplicitlyDefaultedCopyConstructor(), clang::Sema::CheckExplicitlyDefaultedDefaultConstructor(), clang::Sema::CheckExplicitlyDefaultedDestructor(), clang::Sema::CheckExplicitlyDefaultedMoveAssignment(), clang::Sema::CheckExplicitlyDefaultedMoveConstructor(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckObjCDeclScope(), clang::Sema::CheckParameter(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckVariableDeclaration(), CreateNewFunctionDecl(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DiagnoseDuplicateIvars(), DiagnoseInvalidRedeclaration(), clang::Sema::FinishTemplateArgumentDeduction(), clang::Sema::HandleField(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::isIncompatibleTypedef(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::MergeVarDeclTypes(), clang::Sema::ParseTypedefDecl(), clang::Sema::SetParamDefaultArgument(), clang::TemplateDeclInstantiator::VisitClassScopeFunctionSpecializationDecl(), clang::ASTDeclReader::VisitDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| void Decl::setLexicalDeclContext | ( | DeclContext * | DC | ) |
Definition at line 201 of file DeclBase.cpp.
References getASTContext(), getDeclContext(), and getLexicalDeclContext().
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnProperty(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::ObjCImplDecl::addClassMethod(), clang::ObjCImplDecl::addInstanceMethod(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckTemplateIdType(), CreateNewFunctionDecl(), clang::Sema::ProcessPropertyDecl(), clang::ASTDeclReader::Visit(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclReader::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitNamespaceDecl(), clang::ASTNodeImporter::VisitObjCCategoryDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCInterfaceDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitObjCProtocolDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| void clang::Decl::setLocation | ( | SourceLocation | L | ) | [inline] |
Definition at line 344 of file DeclBase.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnLabelStmt(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckMemberSpecialization(), clang::AccessSpecDecl::setAccessSpecifierLoc(), and clang::ASTDeclReader::VisitDecl().
| void clang::Decl::setModulePrivate | ( | bool | MP = true | ) | [inline, protected] |
Specify whether this declaration was marked as being private to the module in which it was defined.
Definition at line 508 of file DeclBase.h.
References ModulePrivateFlag, and NextInContextAndBits.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIvar(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckClassTemplate(), clang::Sema::HandleField(), clang::Sema::ParseTypedefDecl(), and clang::ASTDeclReader::VisitDecl().
| void clang::Decl::setNonMemberOperator | ( | ) | [inline] |
Specifies that this declaration is a C++ overloaded non-member.
Definition at line 829 of file DeclBase.h.
References getKind(), IDNS_NonMemberOperator, and IDNS_Ordinary.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| void clang::Decl::setObjectOfFriendDecl | ( | bool | PreviouslyDeclared | ) | [inline] |
Changes the namespace of this declaration to reflect that it's the object of a friend declaration.
These declarations appear in the lexical context of the friending class, but in the semantic context of the actual entity. This property applies only to a specific decl object; other redeclarations of the same entity may not (and probably don't) share this property.
Definition at line 789 of file DeclBase.h.
References IDNS_Ordinary, IDNS_OrdinaryFriend, IDNS_Tag, IDNS_TagFriend, and IDNS_Type.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), clang::Sema::CheckClassTemplate(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| void clang::Decl::setOwningModuleID | ( | unsigned | ID | ) | [inline, protected] |
Set the owning module ID.
Definition at line 518 of file DeclBase.h.
References isFromASTFile().
Referenced by clang::ASTDeclReader::VisitDecl().
| void clang::Decl::setReferenced | ( | bool | R = true | ) | [inline] |
Definition at line 481 of file DeclBase.h.
Referenced by DoMarkVarDeclReferenced(), clang::Sema::MarkAnyDeclReferenced(), clang::Sema::MarkFunctionReferenced(), clang::ASTDeclReader::VisitDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| void clang::Decl::setTopLevelDeclInObjCContainer | ( | bool | V = true | ) | [inline] |
Definition at line 490 of file DeclBase.h.
References NextInContextAndBits, and TopLevelDeclInObjCContainerFlag.
Referenced by clang::Sema::ActOnDeclarator(), clang::Sema::ActOnFunctionDeclarator(), and clang::ASTDeclReader::VisitDecl().
| void clang::Decl::setUsed | ( | bool | U = true | ) | [inline] |
Definition at line 476 of file DeclBase.h.
References Used.
Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnGotoStmt(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::MarkFunctionReferenced(), MarkVarDeclODRUsed(), clang::ASTDeclReader::VisitDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| specific_attr_iterator<T> clang::Decl::specific_attr_begin | ( | ) | const [inline] |
Definition at line 436 of file DeclBase.h.
References attr_begin().
Referenced by clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::BuildCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), getPrintfFormatArgumentNum(), getVisibilityOf(), handleAnnotateAttr(), handleFormatAttr(), handleOwnershipAttr(), clang::Sema::mergeDeclAttributes(), and mergeParamDeclAttributes().
| specific_attr_iterator<T> clang::Decl::specific_attr_end | ( | ) | const [inline] |
Definition at line 440 of file DeclBase.h.
References attr_end().
Referenced by clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::BuildCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), getPrintfFormatArgumentNum(), getVisibilityOf(), handleAnnotateAttr(), handleFormatAttr(), handleOwnershipAttr(), clang::Sema::mergeDeclAttributes(), and mergeParamDeclAttributes().
| void Decl::swapAttrs | ( | Decl * | D | ) |
Definition at line 557 of file DeclBase.cpp.
References clang::ASTContext::eraseDeclAttrs(), getASTContext(), clang::ASTContext::getDeclAttrs(), and swapAttrs().
Referenced by swapAttrs().
friend class ASTDeclReader [friend] |
Reimplemented in clang::ImportDecl, clang::EnumDecl, clang::StaticAssertDecl, clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::NamespaceAliasDecl, clang::UsingDirectiveDecl, clang::IndirectFieldDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::ClassScopeFunctionSpecializationDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::CXXConstructorDecl, clang::ObjCPropertyImplDecl, clang::FriendTemplateDecl, clang::ClassTemplateDecl, clang::ObjCImplementationDecl, clang::ClassTemplatePartialSpecializationDecl, clang::ObjCCategoryImplDecl, clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl, clang::ObjCCategoryDecl, clang::ObjCProtocolDecl, clang::TemplateTemplateParmDecl, clang::NonTypeTemplateParmDecl, clang::ObjCInterfaceDecl, clang::FunctionTemplateDecl, clang::VarDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, and clang::FriendDecl.
Definition at line 291 of file DeclBase.h.
friend class ASTDeclWriter [friend] |
Reimplemented in clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::ClassScopeFunctionSpecializationDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::CXXConstructorDecl, clang::ClassTemplateDecl, clang::ObjCImplementationDecl, clang::ClassTemplatePartialSpecializationDecl, clang::ObjCCategoryImplDecl, clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl, clang::ObjCCategoryDecl, clang::ObjCProtocolDecl, clang::TemplateTemplateParmDecl, clang::ObjCInterfaceDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, and clang::FriendDecl.
Definition at line 290 of file DeclBase.h.
friend class ASTReader [friend] |
Reimplemented in clang::ImportDecl, clang::TypeDecl, clang::CXXRecordDecl, clang::ObjCProtocolDecl, clang::ObjCInterfaceDecl, and clang::RedeclarableTemplateDecl.
Definition at line 292 of file DeclBase.h.
friend class CXXClassMemberWrapper [friend] |
Definition at line 267 of file DeclBase.h.
friend class DeclContext [friend] |
Reimplemented in clang::RecordDecl, clang::UsingDirectiveDecl, clang::TypeDecl, and clang::CXXRecordDecl.
Definition at line 205 of file DeclBase.h.
unsigned clang::Decl::Access [protected] |
Access - Used by C++ decls for the access specifier.
Definition at line 266 of file DeclBase.h.
Referenced by getAccess(), and setAccess().
unsigned clang::Decl::CachedLinkage [mutable, protected] |
If HasCachedLinkage, the linkage of this declaration.
This field is only valid for NamedDecls subclasses.
Definition at line 288 of file DeclBase.h.
Referenced by clang::NamedDecl::getLinkage(), and clang::NamedDecl::getLinkageAndVisibility().
unsigned clang::Decl::FromASTFile [protected] |
Whether this declaration was loaded from an AST file.
Definition at line 270 of file DeclBase.h.
Referenced by isFromASTFile(), and clang::ASTDeclReader::VisitDecl().
unsigned clang::Decl::HasCachedLinkage [mutable, protected] |
Whether the CachedLinkage field is active.
This field is only valid for NamedDecls subclasses.
Definition at line 283 of file DeclBase.h.
Referenced by clang::NamedDecl::ClearLinkageCache(), clang::NamedDecl::getLinkage(), and clang::NamedDecl::getLinkageAndVisibility().
unsigned clang::Decl::Hidden [protected] |
Whether this declaration is hidden from normal name lookup, e.g., because it is was loaded from an AST file is either module-private or because its submodule has not been made visible.
Definition at line 275 of file DeclBase.h.
Referenced by clang::CXXRecordDecl::getFinalOverriders(), clang::NamedDecl::isHidden(), clang::CXXRecordDecl::lookupInBases(), and clang::ASTDeclReader::VisitDecl().
unsigned clang::Decl::IdentifierNamespace [protected] |
IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
Definition at line 278 of file DeclBase.h.
llvm::PointerIntPair<Decl *, 2, unsigned> clang::Decl::NextInContextAndBits [protected] |
The next declaration within the same lexical DeclContext. These pointers form the linked list that is traversed via DeclContext's decls_begin()/decls_end().
The extra two bits are used for the TopLevelDeclInObjCContainer and ModulePrivate bits.
Definition at line 202 of file DeclBase.h.
Referenced by clang::DeclContext::addHiddenDecl(), clang::DeclContext::BuildDeclChain(), getNextDeclInContext(), clang::DeclContext::isDeclInLexicalTraversal(), isModulePrivate(), isTopLevelDeclInObjCContainer(), clang::DeclContext::removeDecl(), setModulePrivate(), and setTopLevelDeclInObjCContainer().