|
clang
5.0.0
|
Decl - This represents one declaration (or definition), e.g. More...
#include "clang/AST/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... | |
| 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, IDNS_LocalExtern = 0x0800, IDNS_OMPReduction = 0x1000 } |
| IdentifierNamespace - The different namespaces in which declarations may appear. More... | |
| 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, OBJC_TQ_CSNullability = 0x40 } |
| ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declarations. More... | |
| enum | ModuleOwnershipKind : unsigned { ModuleOwnershipKind::Unowned, ModuleOwnershipKind::Visible, ModuleOwnershipKind::VisibleWhenImported, ModuleOwnershipKind::ModulePrivate } |
| The kind of ownership a declaration has, for visibility purposes. More... | |
| enum | FriendObjectKind { FOK_None, FOK_Declared, FOK_Undeclared } |
| typedef AttrVec::const_iterator | attr_iterator |
| typedef llvm::iterator_range < attr_iterator > | attr_range |
| typedef llvm::iterator_range < redecl_iterator > | redecl_range |
Public Member Functions | |
| virtual SourceRange | getSourceRange () const LLVM_READONLY |
| Source range that this declaration covers. More... | |
| SourceLocation | getLocStart () const LLVM_READONLY |
| SourceLocation | getLocEnd () const LLVM_READONLY |
| 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 |
| Decl * | getNonClosureContext () |
| Find the innermost non-closure ancestor of this declaration, walking up through blocks, lambdas, etc. More... | |
| const Decl * | getNonClosureContext () const |
| TranslationUnitDecl * | getTranslationUnitDecl () |
| const TranslationUnitDecl * | getTranslationUnitDecl () const |
| bool | isInAnonymousNamespace () const |
| bool | isInStdNamespace () const |
| ASTContext & | getASTContext () const LLVM_READONLY |
| void | setAccess (AccessSpecifier AS) |
| AccessSpecifier | getAccess () const |
| AccessSpecifier | getAccessUnsafe () const |
| Retrieve the access specifier for this declaration, even though it may not yet have been properly set. More... | |
| bool | hasAttrs () const |
| void | setAttrs (const AttrVec &Attrs) |
| AttrVec & | getAttrs () |
| const AttrVec & | getAttrs () const |
| void | dropAttrs () |
| void | addAttr (Attr *A) |
| attr_range | attrs () const |
| attr_iterator | attr_begin () const |
| attr_iterator | attr_end () const |
| template<typename T > | |
| void | dropAttr () |
| template<typename T > | |
| llvm::iterator_range < specific_attr_iterator< T > > | specific_attrs () const |
| 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 |
| getMaxAlignment - return the maximum alignment specified by attributes on this decl, 0 if there are none. More... | |
| void | setInvalidDecl (bool Invalid=true) |
| setInvalidDecl - Indicates the Decl had a semantic error. More... | |
| bool | isInvalidDecl () const |
| bool | isImplicit () const |
| isImplicit - Indicates whether the declaration was implicitly generated by the implementation. More... | |
| void | setImplicit (bool I=true) |
| bool | isUsed (bool CheckUsedAttr=true) const |
| Whether any (re-)declaration of the entity was used, meaning that a definition is required. More... | |
| void | setIsUsed () |
| Set whether the declaration is used, in the sense of odr-use. More... | |
| void | markUsed (ASTContext &C) |
| Mark the declaration used, in the sense of odr-use. More... | |
| bool | isReferenced () const |
| Whether any declaration of this entity was referenced. More... | |
| bool | isThisDeclarationReferenced () const |
| Whether this declaration was referenced. More... | |
| 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. More... | |
| void | setTopLevelDeclInObjCContainer (bool V=true) |
| ExternalSourceSymbolAttr * | getExternalSourceSymbolAttr () const |
| Looks on this and related declarations for an applicable external source symbol attribute. More... | |
| bool | isModulePrivate () const |
| Whether this declaration was marked as being private to the module in which it was defined. More... | |
| bool | isExported () const |
| Whether this declaration is exported (by virtue of being lexically within an ExportDecl or by being a NamespaceDecl). More... | |
| bool | hasDefiningAttr () const |
| Return true if this declaration has an attribute which acts as definition of the entity, such as 'alias' or 'ifunc'. More... | |
| const Attr * | getDefiningAttr () const |
| Return this declaration's defining attribute if it has one. More... | |
| AvailabilityResult | getAvailability (std::string *Message=nullptr, VersionTuple EnclosingVersion=VersionTuple()) const |
| Determine the availability of the given declaration. More... | |
| VersionTuple | getVersionIntroduced () const |
| Retrieve the version of the target platform in which this declaration was introduced. More... | |
| bool | isDeprecated (std::string *Message=nullptr) const |
| Determine whether this declaration is marked 'deprecated'. More... | |
| bool | isUnavailable (std::string *Message=nullptr) const |
| Determine whether this declaration is marked 'unavailable'. More... | |
| bool | isWeakImported () const |
| Determine whether this is a weak-imported symbol. More... | |
| 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. More... | |
| bool | isFromASTFile () const |
| Determine whether this declaration came from an AST file (such as a precompiled header or module) rather than having been parsed. More... | |
| unsigned | getGlobalID () const |
| Retrieve the global declaration ID associated with this declaration, which specifies where this Decl was loaded from. More... | |
| unsigned | getOwningModuleID () const |
| Retrieve the global ID of the module that owns this particular declaration. More... | |
| Module * | getImportedOwningModule () const |
| Get the imported owning module, if this decl is from an imported (non-local) module. More... | |
| Module * | getLocalOwningModule () const |
| Get the local owning module, if known. More... | |
| void | setLocalOwningModule (Module *M) |
| bool | hasOwningModule () const |
| Is this declaration owned by some module? More... | |
| Module * | getOwningModule () const |
| Get the module that owns this declaration. More... | |
| bool | isHidden () const |
| Determine whether this declaration might be hidden from name lookup. More... | |
| void | setVisibleDespiteOwningModule () |
| Set that this declaration is globally visible, even if it came from a module that is not visible. More... | |
| ModuleOwnershipKind | getModuleOwnershipKind () const |
| Get the kind of module ownership for this declaration. More... | |
| void | setModuleOwnershipKind (ModuleOwnershipKind MOK) |
| Set whether this declaration is hidden from name lookup. More... | |
| unsigned | getIdentifierNamespace () const |
| bool | isInIdentifierNamespace (unsigned NS) const |
| bool | hasTagIdentifierNamespace () const |
| DeclContext * | getLexicalDeclContext () |
| getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC). More... | |
| const DeclContext * | getLexicalDeclContext () const |
| virtual bool | isOutOfLine () const |
| Determine whether this declaration is declared out of line (outside its semantic context). More... | |
| void | setDeclContext (DeclContext *DC) |
| setDeclContext - Set both the semantic and lexical DeclContext to DC. More... | |
| void | setLexicalDeclContext (DeclContext *DC) |
| bool | isDefinedOutsideFunctionOrMethod () const |
| isDefinedOutsideFunctionOrMethod - This predicate returns true if this scoped decl is defined outside the current function or method. More... | |
| bool | isLexicallyWithinFunctionOrMethod () const |
| Returns true if this declaration lexically is inside a function. More... | |
| const DeclContext * | getParentFunctionOrMethod () const |
| If this decl is defined inside a function/method/block it returns the corresponding DeclContext, otherwise it returns null. More... | |
| DeclContext * | getParentFunctionOrMethod () |
| virtual Decl * | getCanonicalDecl () |
| Retrieves the "canonical" declaration of the given declaration. More... | |
| const Decl * | getCanonicalDecl () const |
| bool | isCanonicalDecl () const |
| Whether this particular Decl is a canonical one. More... | |
| redecl_range | redecls () const |
| Returns an iterator range for all the redeclarations of the same decl. More... | |
| redecl_iterator | redecls_begin () const |
| 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. More... | |
| 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. More... | |
| bool | isFirstDecl () const |
| True if this is the first declaration in its redeclaration chain. More... | |
| Decl * | getMostRecentDecl () |
| Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration). More... | |
| const Decl * | getMostRecentDecl () const |
| Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration). More... | |
| virtual Stmt * | getBody () const |
| 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. More... | |
| virtual bool | hasBody () const |
Returns true if this Decl represents a declaration for a body of code, such as a function or method definition. More... | |
| SourceLocation | getBodyRBrace () const |
| getBodyRBrace - Gets the right brace of the body, if a body exists. More... | |
| bool | isTemplateParameter () const |
| isTemplateParameter - Determines whether this declaration is a template parameter. More... | |
| bool | isTemplateParameterPack () const |
| isTemplateParameter - Determines whether this declaration is a template parameter pack. More... | |
| bool | isParameterPack () const |
| Whether this declaration is a parameter pack. More... | |
| bool | isTemplateDecl () const |
| returns true if this declaration is a template More... | |
| bool | isFunctionOrFunctionTemplate () const |
| Whether this declaration is a function or function template. More... | |
| TemplateDecl * | getDescribedTemplate () const |
| If this is a declaration that describes some template, this method returns that template declaration. More... | |
| FunctionDecl * | getAsFunction () LLVM_READONLY |
| Returns the function itself, or the templated function if this is a function template. More... | |
| const FunctionDecl * | getAsFunction () const |
| void | setLocalExternDecl () |
| Changes the namespace of this declaration to reflect that it's a function-local extern declaration. More... | |
| bool | isLocalExternDecl () |
| Determine whether this is a block-scope declaration with linkage. More... | |
| void | setObjectOfFriendDecl (bool PerformFriendInjection=false) |
| Changes the namespace of this declaration to reflect that it's the object of a friend declaration. More... | |
| FriendObjectKind | getFriendObjectKind () const |
| Determines whether this declaration is the object of a friend declaration and, if so, what kind. More... | |
| void | setNonMemberOperator () |
| Specifies that this declaration is a C++ overloaded non-member. More... | |
| 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 | dumpColor () const |
| void | dump (raw_ostream &Out, bool Deserialize=false) const |
| const FunctionType * | getFunctionType (bool BlocksToo=true) const |
| Looks through the Decl's underlying type to extract a FunctionType when possible. More... | |
Static Public Member Functions | |
| static unsigned | getIdentifierNamespaceForKind (Kind DK) |
| static bool | isTagIdentifierNamespace (unsigned NS) |
| static void | add (Kind k) |
| static void | EnableStatistics () |
| static void | PrintStats () |
| 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 Member Functions | |
| void * | operator new (std::size_t Size, const ASTContext &Ctx, unsigned ID, std::size_t Extra=0) |
| Allocate memory for a deserialized declaration. More... | |
| void * | operator new (std::size_t Size, const ASTContext &Ctx, DeclContext *Parent, std::size_t Extra=0) |
| Allocate memory for a non-deserialized declaration. More... | |
| Decl (Kind DK, DeclContext *DC, SourceLocation L) | |
| Decl (Kind DK, EmptyShell Empty) | |
| virtual | ~Decl () |
| void | updateOutOfDate (IdentifierInfo &II) const |
| Update a potentially out-of-date declaration. More... | |
| Linkage | getCachedLinkage () const |
| void | setCachedLinkage (Linkage L) const |
| bool | hasCachedLinkage () const |
| void | setModulePrivate () |
| Specify that this declaration was marked as being private to the module in which it was defined. More... | |
| void | setOwningModuleID (unsigned ID) |
| Set the owning module ID. More... | |
| bool | hasLocalOwningModuleStorage () const |
| virtual Decl * | getNextRedeclarationImpl () |
| Returns the next redeclaration or itself if this is the only decl. More... | |
| virtual Decl * | getPreviousDeclImpl () |
| Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain. More... | |
| virtual Decl * | getMostRecentDeclImpl () |
| Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain. More... | |
| ASTMutationListener * | getASTMutationListener () const |
Protected Attributes | |
| llvm::PointerIntPair< Decl *, 2, ModuleOwnershipKind > | NextInContextAndBits |
| The next declaration within the same lexical DeclContext. More... | |
| unsigned | Access: 2 |
| Access - Used by C++ decls for the access specifier. More... | |
| unsigned | FromASTFile: 1 |
| Whether this declaration was loaded from an AST file. More... | |
| unsigned | IdentifierNamespace: 13 |
| IdentifierNamespace - This specifies what IDNS_* namespace this lives in. More... | |
| unsigned | CacheValidAndLinkage: 3 |
| If 0, we have not computed the linkage of this declaration. More... | |
Friends | |
| class | DeclContext |
| class | CXXClassMemberWrapper |
| class | ASTDeclWriter |
| class | ASTDeclReader |
| class | ASTReader |
| class | LinkageComputer |
| template<typename decl_type > | |
| class | Redeclarable |
Decl - This represents one declaration (or definition), e.g.
a variable, typedef, function, struct, etc.
Note: There are objects tacked on before the beginning of Decl (and its subclasses) in its Decl::operator new(). Proper alignment of all subclasses (not requiring more than the alignment of Decl) is asserted in DeclBase.cpp.
Definition at line 81 of file DeclBase.h.
| typedef AttrVec::const_iterator clang::Decl::attr_iterator |
Definition at line 479 of file DeclBase.h.
| typedef llvm::iterator_range<attr_iterator> clang::Decl::attr_range |
Definition at line 480 of file DeclBase.h.
| typedef llvm::iterator_range<redecl_iterator> clang::Decl::redecl_range |
Definition at line 907 of file DeclBase.h.
| Enumerator | |
|---|---|
| FOK_None |
Not a friend object. |
| FOK_Declared |
A friend of a previously-declared entity. |
| FOK_Undeclared |
A friend of a previously-undeclared entity. |
Definition at line 1060 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.
Definition at line 110 of file DeclBase.h.
| enum clang::Decl::Kind |
Lists the kind of concrete classes of Decl.
Definition at line 84 of file DeclBase.h.
|
strong |
The kind of ownership a declaration has, for visibility purposes.
This enumeration is designed such that higher values represent higher levels of name hiding.
Definition at line 208 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.
Definition at line 190 of file DeclBase.h.
|
inlineprotected |
Definition at line 358 of file DeclBase.h.
|
inlineprotected |
Definition at line 368 of file DeclBase.h.
|
protectedvirtual |
Definition at line 262 of file DeclBase.cpp.
|
static |
Definition at line 172 of file DeclBase.cpp.
|
inline |
Definition at line 472 of file DeclBase.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnPragmaRedefineExtname(), clang::Sema::ActOnPragmaUnused(), clang::Sema::ActOnPragmaWeakID(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignmentAttributesForRecord(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), clang::Sema::AddCFAuditedAttribute(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddLaunchBoundsAttr(), clang::Sema::AddModeAttr(), clang::Sema::AddMsStructLayoutForRecord(), clang::Sema::AddNSConsumedAttr(), clang::Sema::AddOptnoneAttributeIfNoConflicts(), clang::Sema::AddParameterABIAttr(), AddPropertyAttrs(), clang::Sema::AddPushedVisibilityAttribute(), assignInheritanceModel(), clang::Sema::AttachBaseSpecifiers(), buildCaptureDecl(), buildVarDecl(), clang::Sema::CheckARCMethodDecl(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCompleteVariableDeclaration(), checkDeclInTargetContext(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkDLLAttributeRedeclaration(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::checkInitMethod(), clang::Sema::CheckNontrivialField(), copyAttrIfPresent(), clang::Sema::CUDASetLambdaAttrs(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::FinalizeDeclaration(), handleAbiTagAttr(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), handleAMDGPUFlatWorkGroupSizeAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleAMDGPUWavesPerEUAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleARMInterruptAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAttrWithMessage(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCFAuditedTransferAttr(), handleCFUnknownTransferAttr(), handleCleanupAttr(), handleColdAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestructorAttr(), handleDiagnoseIfAttr(), handleDisableTailCallsAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnumExtensibilityAttr(), handleExclusiveTrylockFunctionAttr(), handleExternalSourceSymbolAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHotAttr(), handleIBOutlet(), handleIBOutletCollection(), handleIFuncAttr(), handleInitPriorityAttr(), handleInternalLinkageAttr(), handleLayoutVersion(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleMinSizeAttr(), handleMipsInterruptAttr(), handleMSInheritanceAttr(), handleMSP430InterruptAttr(), handleNakedAttr(), handleNoCallerSavedRegsAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNotTailCalledAttr(), handleNSReturnsRetainedAttr(), handleObjCBoxable(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOpenCLAccessAttr(), handleOptimizeNoneAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleSharedTrylockFunctionAttr(), handleSimpleAttribute(), handleSubGroupSize(), handleSuppressAttr(), handleTargetAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUnusedAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), handleXRayLogArgsAttr(), clang::ASTImporter::Imported(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateAttrsForDecl(), instantiateDependentDiagnoseIfAttr(), instantiateDependentEnableIfAttr(), clang::Sema::makeUnavailableInSystemHeader(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), mergeAlignedAttrs(), mergeDeclAttribute(), clang::Sema::mergeDeclAttributes(), clang::Sema::MergeFunctionDecl(), mergeInterfaceMethodToImpl(), mergeParamDeclAttributes(), clang::Sema::ProcessPropertyDecl(), clang::Sema::propagateDLLAttrToBaseClassTemplate(), clang::RecordDecl::setCapturedRecord(), clang::ASTDeclReader::UpdateDecl(), and clang::ASTNodeImporter::VisitIndirectFieldDecl().
|
inline |
Definition at line 486 of file DeclBase.h.
|
inline |
Definition at line 489 of file DeclBase.h.
|
inline |
Definition at line 482 of file DeclBase.h.
Referenced by AddPropertyAttrs(), clang::Sema::checkThisInStaticMemberFunctionAttributes(), DeclHasAttr(), getAttrForPlatform(), getAvailability(), getVersionIntroduced(), hasAttribute(), InjectAnonymousStructOrUnionMembers(), clang::threadSafety::BeforeSet::insertAttrExprs(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateAttrsForDecl(), clang::ValueDecl::isWeak(), isWeakImported(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), and clang::ASTNodeImporter::VisitIndirectFieldDecl().
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 623 of file DeclBase.cpp.
References getASTContext(), clang::ASTContext::getLangOpts(), clang::ObjCRuntime::hasWeakClassImport(), and clang::LangOptions::ObjCRuntime.
Referenced by handleWeakImportAttr(), and isWeakImported().
|
static |
Definition at line 813 of file DeclBase.cpp.
References clang::DeclContext::getDeclKind().
Referenced by clang::ast_matchers::AST_MATCHER_P(), clang::PredefinedExpr::ComputeName(), and clang::cast_convert_decl_context< ToTy, IsKnownSubtype >::doit().
|
static |
Definition at line 832 of file DeclBase.cpp.
References getKind().
Referenced by clang::BackendConsumer::StackSizeDiagHandler().
Definition at line 1086 of file DeclBase.h.
|
inline |
Definition at line 494 of file DeclBase.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfFunctionDef(), checkAttributesAfterMerging(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCompleteVariableDeclaration(), checkDLLAttributeRedeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::FinalizeDeclaration(), clang::Sema::mergeDLLExportAttr(), clang::Sema::MergeFunctionDecl(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeOptimizeNoneAttr(), clang::Sema::mergeUuidAttr(), clang::Sema::MergeVarDecl(), mergeVisibilityAttr(), clang::Sema::ProcessDeclAttributeList(), and StripImplicitInstantiation().
| void Decl::dropAttrs | ( | ) |
Definition at line 801 of file DeclBase.cpp.
References clang::ASTContext::eraseDeclAttrs(), and getASTContext().
Referenced by clang::Sema::mergeDeclAttributes(), and mergeParamDeclAttributes().
| LLVM_DUMP_METHOD void Decl::dump | ( | ) | const |
Definition at line 2535 of file ASTDumper.cpp.
References dump().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::LookupResult::dump(), and clang::arcmt::trans::MigrationContext::dumpGCAttrs().
Definition at line 2537 of file ASTDumper.cpp.
References P.
| LLVM_DUMP_METHOD void Decl::dumpColor | ( | ) | const |
Definition at line 2544 of file ASTDumper.cpp.
References P.
|
static |
Definition at line 144 of file DeclBase.cpp.
Referenced by clang::ParseAST().
|
inline |
Definition at line 451 of file DeclBase.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), clang::Sema::ActOnVarTemplateSpecialization(), clang::LookupResult::addDecl(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildUsingPackDecl(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CodeCompleteCall(), clang::MemberExpr::Create(), DiagnoseAccessPath(), EvaluateUnaryTypeTrait(), clang::Sema::findInheritingConstructor(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::getConstructorInfo(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), IsAccessible(), IsMicrosoftUsingDeclarationAccessBug(), clang::Sema::IsSimplyAccessible(), mangleThunkThisAdjustment(), clang::Sema::MergeVarDecl(), clang::Sema::SetMemberAccessSpecifier(), clang::ASTNodeImporter::VisitAccessSpecDecl(), ODRDeclVisitor::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTDeclWriter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::ASTNodeImporter::VisitVarTemplateDecl().
|
inline |
Retrieve the access specifier for this declaration, even though it may not yet have been properly set.
Definition at line 458 of file DeclBase.h.
| FunctionDecl * Decl::getAsFunction | ( | ) |
Returns the function itself, or the templated function if this is a function template.
Definition at line 199 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnReenterFunctionContext(), AddResultTypeChunk(), clang::Sema::canSkipFunctionBody(), clang::Sema::checkCUDATargetOverload(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckOverload(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::DiagnoseUnguardedAvailabilityViolations(), clang::Sema::FindAssociatedClassesAndNamespaces(), GetConversionType(), clang::getDeclUsageType(), getLVForNamespaceScopeDecl(), hasOnlyNonStaticMemberFunctions(), clang::ADLResult::insert(), clang::NamedDecl::isCXXInstanceMember(), MarkKnownEmitted(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), clang::Sema::MergeFunctionDecl(), TryDiagnoseProtectedAccess(), and clang::ento::CXXSelfAssignmentBRVisitor::VisitNode().
|
inline |
Definition at line 994 of file DeclBase.h.
| ASTContext & Decl::getASTContext | ( | ) | const |
Definition at line 346 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(), computeLVForDecl(), clang::PredefinedExpr::ComputeName(), clang::ObjCObjectType::computeSuperClassTypeSlow(), clang::CXXRecordDecl::conversion_begin(), clang::CXXRecordDecl::conversion_end(), clang::tooling::createRenameAtomicChanges(), clang::NamedDecl::declarationReplaces(), clang::Sema::DeclClonePragmaWeak(), clang::DeclRefExpr::DeclRefExpr(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), dropAttrs(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::CXXMethodDecl::end_overridden_methods(), clang::VarDecl::ensureEvaluatedStmt(), evaluateCDTSize(), clang::VarDecl::evaluateValue(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::RedeclarableTemplateDecl::findSpecializationImpl(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), formatBlockPlaceholder(), FormatFunctionParameter(), clang::index::CodegenNameGenerator::Implementation::getAllManglings(), clang::AnalysisDeclContext::getASTContext(), clang::StmtSequence::getASTContext(), getASTMutationListener(), getAttrs(), getAvailability(), clang::ObjCMethodDecl::getBody(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getBuiltinID(), clang::FunctionDecl::getCallResultType(), clang::AnalysisDeclContext::getCFG(), clang::FunctionDecl::getClassScopeSpecializationPattern(), clang::RedeclarableTemplateDecl::getCommonPtr(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::CXXRecordDecl::getDestructor(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCCategoryDecl::getImplementation(), clang::CXXRecordDecl::getIndirectPrimaryBases(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::FunctionTemplateDecl::getInjectedTemplateArgs(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CXXRecordDecl::getLambdaStaticInvoker(), clang::tooling::getLocationsOfUSRs(), clang::LinkageComputer::getLVForDecl(), getLVForLocalDecl(), getLVForNamespaceScopeDecl(), getMaxAlignment(), clang::VarDecl::getMemberSpecializationInfo(), clang::FunctionDecl::getMinRequiredArguments(), clang::CXXRecordDecl::getMSVtorDispMode(), clang::OMPDeclareReductionDecl::getPrevDeclInScope(), clang::getPrimaryMergedDecl(), clang::NamedDecl::getQualifiedNameAsString(), clang::FunctionDecl::getReturnTypeSourceRange(), getSelfInitExpr(), clang::ObjCMethodDecl::getSendResultType(), clang::ObjCObjectPointerType::getSuperClassType(), clang::VarDecl::getTLSKind(), clang::AnalysisDeclContext::getUnoptimizedCFG(), getVersionIntroduced(), getVisibilityOf(), clang::CXXRecordDecl::getVisibleConversionFunctions(), clang::VarDecl::hasDefinition(), hasLocalOwningModuleStorage(), hasSameOverloadableAttrs(), clang::Sema::hasStructuralCompatLayout(), clang::ASTImporter::Imported(), clang::CXXConstructorDecl::init_begin(), clang::ObjCImplementationDecl::init_begin(), clang::ento::CheckerContext::isCLibraryFunction(), isConsumerInterestedIn(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), isImportedDeclContext(), clang::Type::isIncompleteType(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::CXXRecordDecl::isLiteral(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionDecl::isMSExternInline(), isNoexcept(), clang::Expr::isPotentialConstantExpr(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), clang::ASTNodeImporter::IsStructuralMatch(), clang::VarDecl::isThisDeclarationADefinition(), clang::CXXMethodDecl::isUsualDeallocationFunction(), isWeakImported(), isZeroSized(), clang::FunctionTemplateDecl::LoadLazySpecializations(), clang::ClassTemplateDecl::LoadLazySpecializations(), clang::VarTemplateDecl::LoadLazySpecializations(), clang::CXXRecordDecl::lookupInBases(), clang::RecordDecl::mayInsertExtraPadding(), clang::CXXMethodDecl::overridden_methods(), print(), clang::NamedDecl::printQualifiedName(), clang::VarTemplateSpecializationDecl::Profile(), clang::CXXRecordDecl::removeConversion(), clang::ObjCMethodDecl::setAsRedeclaration(), clang::CXXRecordDecl::setBases(), clang::RecordDecl::setCapturedRecord(), clang::ObjCImplDecl::setClassInterface(), clang::VarDecl::setDescribedVarTemplate(), clang::MaterializeTemporaryExpr::setExtendingDecl(), clang::ObjCInterfaceDecl::setExternallyCompleted(), clang::VarTemplateSpecializationDecl::setExternLoc(), clang::FunctionDecl::setFunctionTemplateSpecialization(), clang::ObjCInterfaceDecl::setImplementation(), clang::ObjCCategoryDecl::setImplementation(), clang::VarDecl::setInit(), clang::VarTemplateSpecializationDecl::setInstantiationOf(), clang::CXXRecordDecl::setInstantiationOfMemberClass(), clang::EnumDecl::setInstantiationOfMemberEnum(), clang::FunctionDecl::setInstantiationOfMemberFunction(), clang::VarDecl::setInstantiationOfStaticDataMember(), setLexicalDeclContext(), clang::TypedefNameDecl::setModedTypeSourceInfo(), clang::LabelDecl::setMSAsmLabel(), SetNestedNameSpecifier(), clang::FunctionDecl::setParams(), clang::BlockDecl::setParams(), clang::DeclaratorDecl::setQualifierInfo(), clang::TagDecl::setQualifierInfo(), clang::VarTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::TagDecl::setTemplateParameterListsInfo(), clang::VarTemplateSpecializationDecl::setTypeAsWritten(), shouldOmitDefinition(), shouldRunOnFunctionOrMethod(), clang::CXXMethodDecl::size_overridden_methods(), clang::TagDecl::startDefinition(), updateOutOfDate(), useInlineVisibilityHidden(), and clang::ASTNodeImporter::VisitRecordDecl().
|
protected |
Definition at line 350 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getASTMutationListener().
Referenced by clang::ClassTemplateDecl::AddPartialSpecialization(), clang::VarTemplateDecl::AddPartialSpecialization(), clang::RedeclarableTemplateDecl::addSpecializationImpl(), clang::TagDecl::completeDefinition(), and clang::CXXDestructorDecl::setOperatorDelete().
|
inline |
Definition at line 518 of file DeclBase.h.
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddParameterABIAttr(), AddVariableConstraints(), checkAttributesAfterMerging(), checkAttrMutualExclusion(), clang::Sema::CheckBaseSpecifier(), clang::consumed::ConsumedStmtVisitor::checkCallability(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), checkDLLAttributeRedeclaration(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), CheckNakedParmReference(), clang::Sema::CheckOverrideControl(), clang::consumed::ConsumedStateMap::checkParamsForReturnTypestate(), classifyPointerDeclarator(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), copyAttrIfPresent(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseUnusedExprResult(), DiagnoseUnusedOfDecl(), DoEmitAvailabilityWarning(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), EmitGlobalNamedRegister(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), extractRegisterName(), clang::Sema::FinalizeDeclaration(), GenOpenCLArgMetadata(), getCallingConventionForDecl(), clang::getDLLAttr(), getExternalSourceSymbolAttr(), GetFullTypeForDeclarator(), clang::CodeGen::CodeGenModule::getFunctionFeatureMap(), getNonNullAttr(), getOpenCLArgAccess(), clang::index::getSymbolInfo(), getVisibilityOf(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::consumed::ConsumedStmtVisitor::handleCall(), handleSubGroupSize(), handleVecReturnAttr(), handleVecTypeHint(), handleWorkGroupSize(), hasIdenticalPassObjectSizeAttrs(), InstantiateDefaultCtorDefaultArgs(), isGeneratedDecl(), clang::MangleContext::mangleName(), mapConsumableAttrState(), MaybeAddSentinel(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeDeclAttributes(), clang::Sema::mergeDLLExportAttr(), clang::Sema::MergeFunctionDecl(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), clang::Sema::mergeSectionAttr(), clang::Sema::mergeUuidAttr(), mergeVisibilityAttr(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), recordUsesEBO(), clang::CodeGen::CodeGenModule::setTLSMode(), clang::CodeGen::CodeGenFunction::StartFunction(), testsFor(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), clang::Sema::UnifySection(), clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
|
inline |
Definition at line 466 of file DeclBase.h.
Referenced by ActOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), AttributesMatch(), clang::Sema::BuildReturnStmt(), checkNewAttributesAfterDef(), createPrivatesRecordDecl(), DeclContainsAttr(), getMaxAlignment(), getOrderedEnableIfAttrs(), hasAttr(), clang::ASTImporter::Imported(), clang::Sema::mergeAvailabilityAttr(), and clang::ASTDeclWriter::VisitDecl().
| const AttrVec & Decl::getAttrs | ( | ) | const |
Definition at line 808 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getDeclAttrs().
| AvailabilityResult Decl::getAvailability | ( | std::string * | Message = nullptr, |
| VersionTuple | EnclosingVersion = VersionTuple() |
||
| ) | 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. |
| EnclosingVersion | The version to compare with. If empty, assume the deployment target version. |
Definition at line 562 of file DeclBase.cpp.
References clang::AR_Available, clang::AR_Deprecated, clang::AR_Unavailable, attrs(), CheckAvailability(), getASTContext(), and clang::Result.
Referenced by clang::Sema::addMethodToGlobalList(), clang::Sema::CanUseDecl(), clang::Sema::DiagnoseAvailabilityOfDecl(), DiagnoseObjCImplementedDeprecations(), clang::Sema::DiagnoseUnimplementedProperties(), getDeclAvailability(), clang::Sema::getDeletedOrUnavailableSuffix(), ShouldDiagnoseAvailabilityOfDecl(), and WarnUndefinedMethod().
|
inlinevirtual |
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::CapturedDecl, clang::BlockDecl, clang::FunctionDecl, and clang::ObjCMethodDecl.
Definition at line 948 of file DeclBase.h.
Referenced by clang::CloneDetector::analyzeCodeBody(), CheckStringRefAssignedTemporary(), clang::ento::PathDiagnosticLocation::createDeclBegin(), clang::FunctionDecl::getBody(), getBodyRBrace(), 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 851 of file DeclBase.cpp.
References getBody(), clang::SourceRange::getEnd(), and clang::FunctionDecl::getSourceRange().
Referenced by clang::ento::PathDiagnosticLocation::createDeclEnd(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCMethod(), and clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().
|
inlineprotected |
Definition at line 382 of file DeclBase.h.
Referenced by clang::LinkageComputer::getLVForDecl(), and clang::NamedDecl::isLinkageValid().
|
inlinevirtual |
Retrieves the "canonical" declaration of the given declaration.
Reimplemented in clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingPackDecl, clang::UsingDecl, clang::EnumDecl, clang::UsingShadowDecl, clang::TagDecl, clang::VarTemplateDecl, clang::NamespaceAliasDecl, clang::TypedefNameDecl, clang::CXXConversionDecl, clang::IndirectFieldDecl, clang::EnumConstantDecl, clang::CXXDestructorDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::TypeAliasTemplateDecl, clang::ObjCProtocolDecl, clang::ClassTemplateDecl, clang::FunctionDecl, clang::CXXMethodDecl, clang::ObjCInterfaceDecl, clang::VarDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::CXXRecordDecl, clang::NamespaceDecl, and clang::ObjCMethodDecl.
Definition at line 841 of file DeclBase.h.
Referenced by clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPDeclareTargetName(), AddTemplateParameterChunks(), clang::Sema::BuildCXXNestedNameSpecifier(), CheckTemplateArgumentPointerToMember(), compareDeclarations(), clang::Sema::CompleteMemberSpecialization(), clang::NamedDecl::declarationReplaces(), clang::declaresSameEntity(), DeduceNonTypeTemplateArgument(), DiagnoseInvalidRedeclaration(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSelfMove(), clang::Sema::DiagnoseUseOfDecl(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::ADLResult::erase(), clang::ASTReader::forEachImportedKeyDecl(), getCanonicalDecl(), getCanonicalParmVarDecl(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTContext::getCanonicalTemplateName(), clang::ASTContext::getCommentForDecl(), clang::DeclarationNameTable::getCXXDeductionGuideName(), getDeclForLocalLookup(), clang::ASTReader::GetExistingDecl(), clang::ASTWriter::getFirstLocalDecl(), clang::ASTReader::getKeyDeclaration(), clang::CallGraph::getOrInsertNode(), clang::VTableContextBase::getThunkInfo(), hasRecursiveCallInPath(), HasSameBase(), clang::ADLResult::insert(), IsEquivalentForUsingDecl(), clang::OverloadCandidateSet::isNewCandidate(), isSameDeclaration(), isSameTemplate(), isUsed(), clang::Sema::LookupTemplateName(), MatchesFriend(), clang::ASTDeclWriter::RegisterTemplateSpecialization(), clang::LookupResult::resolveKind(), clang::ASTDeclReader::UpdateDecl(), clang::ASTDeclReader::Visit(), and wasDifferentDeclUsedForInlining().
|
inline |
Definition at line 842 of file DeclBase.h.
References getCanonicalDecl().
|
inline |
Definition at line 416 of file DeclBase.h.
Referenced by clang::Sema::ActOnBlockStart(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnDeclarator(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishObjCImplementation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), addAssociatedClassesAndNamespaces(), clang::Sema::AddFunctionCandidates(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddMethodCandidate(), clang::Sema::addMethodToGlobalList(), clang::CodeGen::CodeGenTypes::addRecordTypeName(), addRedeclaredMethods(), adjustCVQualifiersForCXXThisWithinLambda(), adjustParent(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXConstructExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildLambdaExpr(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVarTemplateInstantiation(), clang::Sema::CheckAddressOfOperand(), checkAtomicPropertyMismatch(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConstructor(), clang::Sema::CheckCXXDefaultArgExpr(), checkDeclInTargetContext(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), CheckExplicitInstantiationScope(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::checkInitMethod(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckMessageArgumentTypes(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCMethodOverrides(), checkObjCUnusedIvar(), CheckOperatorNewDeleteDeclarationScope(), clang::Sema::CheckShadow(), clang::Sema::CheckShadowingDeclModification(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), checkTupleLikeDecomposition(), checkTypeParamListConsistency(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::checkVarDeclRedefinition(), ClassifyMemberExpr(), collectOverriddenMethodsSlow(), collectViableConversionCandidates(), clang::ASTReader::CompleteRedeclChain(), computeCachedProperties(), computeDeclRefDependence(), computeLVForDecl(), clang::PredefinedExpr::ComputeName(), clang::CodeCompletionResult::CreateCodeCompletionString(), createFriendTagNNSFixIt(), clang::TypeName::createNestedNameSpecifier(), clang::TypeName::createNestedNameSpecifierForScopeOf(), clang::TypeName::createOuterNNS(), clang::NamedDecl::declarationReplaces(), clang::Sema::DeclareImplicitDeductionGuides(), clang::Sema::DeclClonePragmaWeak(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::DefaultSynthesizeProperties(), DiagnoseBaseOrMemInitializerOrder(), clang::Sema::DiagnoseEmptyLookup(), diagnoseInstanceReference(), DiagnoseInvalidRedeclaration(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnoseShadowingLambdaDecls(), diagnoseUncapturableValueReference(), clang::Sema::DiagnoseUninstantiableTemplate(), DoMarkVarDeclReferenced(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CGDebugInfo::EmitImportDecl(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), evaluateVarDeclInit(), FilterMethodsByTypeBound(), clang::Sema::FinalizeDeclaration(), findBackingIvar(), FindConversionForRefInit(), FindDeclaringClass(), findExplicitInstancetypeDeclarer(), clang::ExternalASTMerger::FindExternalLexicalDecls(), clang::Sema::FindInstantiatedDecl(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), clang::Sema::FinishTemplateArgumentDeduction(), clang::Sema::FixOverloadedFunctionReference(), FormatFunctionParameter(), getAsDeclContextOrEnclosing(), getAssignmentAction(), clang::FunctionDecl::getBuiltinID(), clang::ObjCMethodDecl::getCanonicalDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ConstructorUsingShadowDecl::getConstructedBaseClass(), clang::ObjCIvarDecl::getContainingInterface(), getContextForScopeMatching(), getDeclAvailability(), getDeclContextForTemplateInstationPattern(), getDeclForLocalLookup(), getDefiningModule(), getExternalSourceSymbolAttr(), getFieldIndex(), getFunctionSourceLocation(), getLVForClassMember(), getLVForClosure(), getLVForNamespaceScopeDecl(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), getMethodReceiverIfKnownImmutable(), clang::ASTContext::getObjContainingInterface(), getOutermostFuncOrBlockContext(), clang::ObjCMethodDecl::getOverriddenMethods(), clang::FieldDecl::getParent(), clang::ConstructorUsingShadowDecl::getParent(), getParentFunctionOrMethod(), clang::ObjCMethodDecl::getSendResultType(), clang::Sema::getShadowedDeclaration(), clang::ParmVarDecl::getSourceRange(), getStackIndexOfNearestEnclosingCaptureReadyLambda(), getStaticDeclName(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::index::getSymbolInfo(), clang::Sema::getTemplateInstantiationArgs(), getTranslationUnitDecl(), clang::ObjCPropertyDecl::getUsageType(), clang::ObjCIvarDecl::getUsageType(), clang::ento::MemRegionManager::getVarRegion(), clang::index::IndexingContext::handleDecl(), clang::Sema::HandleDelayedAccessCheck(), handleIBOutletCollection(), handleObjCDesignatedInitializer(), handleObjCRequiresSuperAttr(), clang::Sema::HandlePropertyInClassExtension(), clang::Sema::handleTagNumbering(), handleWeakRefAttr(), hasCopyOrMoveCtorParam(), clang::Sema::hasVisibleMemberSpecialization(), hasWrittenStorageAttribute(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), clang::Sema::HideUsingShadowDecl(), clang::ASTNodeImporter::ImportDeclParts(), InNamespace(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::InstantiateVariableDefinition(), clang::Sema::InstantiateVariableInitializer(), clang::isBetterOverloadCandidate(), clang::ento::CheckerContext::isCLibraryFunction(), isConsumerInterestedIn(), clang::NamedDecl::isCXXClassMember(), isDebuggingContext(), clang::IdentifierResolver::isDeclInScope(), isDeclWithinFunction(), clang::TemplateArgument::isDependent(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::Sema::isFunctionConsideredUnavailable(), isFunctionLocalClass(), clang::FunctionDecl::isGlobal(), isInAnonymousNamespace(), clang::LambdaExpr::isInitCapture(), clang::RecordDecl::isInjectedClassName(), clang::TemplateArgument::isInstantiationDependent(), clang::AnalysisDeclContext::isInStdNamespace(), isInStdNamespace(), clang::CXXRecordDecl::isLocalClass(), clang::FunctionDecl::isMain(), isMethodContextSameForKindofLookup(), isMethodDeclaredInRootProtocol(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::CodeGen::CodeGenFunction::isObjCMethodWithTypeParams(), clang::Expr::isObjCSelfExpr(), isOutOfLine(), isOutOfScopePreviousDeclaration(), isReferenceToNonConstCapture(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), isSingleLineLanguageLinkage(), clang::VarDecl::isStaticDataMember(), clang::Sema::isStdInitializerList(), IsTailPaddedMemberArray(), clang::index::IndexingContext::isTemplateImplicitInstantiation(), isTrackedVar(), IsUserDefinedConversion(), clang::CXXMethodDecl::isUsualDeallocationFunction(), clang::ODRHash::isWhitelistedDecl(), IsWithinTemplateSpecialization(), LookupMemberExpr(), clang::Sema::LookupOrCreateLabel(), clang::DeclContext::makeDeclVisibleInContext(), clang::MangleContext::mangleObjCMethodNameWithoutSize(), clang::Sema::MarkFunctionReferenced(), MatchesFriend(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::mergeObjCMethodDecls(), mergeParamDeclAttributes(), MightInstantiateTo(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrintInstantiationStack(), clang::NamedDecl::printQualifiedName(), clang::Sema::PushOnScopeChains(), RecordModifiableNonNullParam(), clang::DeclContext::removeDecl(), clang::tooling::replaceNestedName(), SelectPropertyForSynthesisFromProtocols(), setLexicalDeclContext(), clang::FunctionDecl::setPure(), shouldConsiderLinkage(), ShouldDiagnoseAvailabilityInContext(), ShouldDiagnoseUnusedDecl(), clang::Sema::shouldLinkDependentDeclWithPrevious(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::Sema::startLambdaDefinition(), SubstDefaultTemplateArgument(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::IdentifierResolver::tryAddTopLevelDecl(), clang::Sema::tryCaptureVariable(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), ValidDuplicateEnum(), clang::ASTNodeImporter::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitLinkageSpecDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTNodeImporter::VisitStaticAssertDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
|
inline |
Definition at line 421 of file DeclBase.h.
| const char * Decl::getDeclKindName | ( | ) | const |
Definition at line 102 of file DeclBase.cpp.
Referenced by clang::ASTDeclWriter::Emit(), and clang::ASTNodeImporter::VisitDecl().
| const Attr * Decl::getDefiningAttr | ( | ) | const |
Return this declaration's defining attribute if it has one.
Definition at line 445 of file DeclBase.cpp.
| TemplateDecl * Decl::getDescribedTemplate | ( | ) | const |
If this is a declaration that describes some template, this method returns that template declaration.
Definition at line 211 of file DeclBase.cpp.
Referenced by getDescribedTemplate().
| ExternalSourceSymbolAttr * Decl::getExternalSourceSymbolAttr | ( | ) | const |
Looks on this and related declarations for an applicable external source symbol attribute.
Definition at line 420 of file DeclBase.cpp.
References getAttr(), getDeclContext(), and ID.
Referenced by GetExternalSourceContainer().
|
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 1070 of file DeclBase.h.
Referenced by clang::Sema::ActOnPureSpecifier(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckMemberSpecialization(), clang::Sema::CheckOverload(), clang::FriendDecl::Create(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), clang::serialization::needsAnonymousDeclarationNumber(), clang::Sema::shouldLinkDependentDeclWithPrevious(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| const FunctionType * Decl::getFunctionType | ( | bool | BlocksToo = true | ) | const |
Looks through the Decl's underlying type to extract a FunctionType when possible.
Will return null if the type underlying the Decl does not have a FunctionType.
Definition at line 900 of file DeclBase.cpp.
References clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::BlockPointerType::getPointeeType(), clang::Type::isBlockPointerType(), and clang::Type::isFunctionPointerType().
Referenced by getFunctionOrMethodNumParams(), getFunctionOrMethodParamType(), getFunctionOrMethodResultType(), handleNonNullAttrParameter(), handleSentinelAttr(), handleWarnUnusedResult(), hasFunctionProto(), isFunctionOrMethod(), and isFunctionOrMethodVariadic().
|
inline |
Retrieve the global declaration ID associated with this declaration, which specifies where this Decl was loaded from.
Definition at line 685 of file DeclBase.h.
Referenced by clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), and clang::ASTReader::getOwningModuleFile().
|
inline |
Definition at line 770 of file DeclBase.h.
Referenced by clang::StoredDeclsList::AddSubsequentDecl(), clang::Sema::ArgumentDependentLookup(), clang::Sema::BuildUsingDeclaration(), CalculateHiddenNames(), setLocalExternDecl(), setObjectOfFriendDecl(), clang::UsingShadowDecl::setTargetDecl(), shouldBeHidden(), clang::UsingShadowDecl::UsingShadowDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTDeclWriter::VisitRedeclarableTemplateDecl(), and clang::ASTDeclWriter::VisitTagDecl().
Definition at line 672 of file DeclBase.cpp.
References IDNS_Label, IDNS_Member, IDNS_Namespace, IDNS_ObjCProtocol, IDNS_OMPReduction, IDNS_Ordinary, IDNS_Tag, IDNS_Type, IDNS_Using, and Label.
|
inline |
Get the imported owning module, if this decl is from an imported (non-local) module.
Definition at line 707 of file DeclBase.h.
Referenced by clang::ASTReader::getOwningModuleNameForDiagnostic(), isConsumerInterestedIn(), and clang::ASTReader::mergeDefinitionVisibility().
|
inline |
Definition at line 410 of file DeclBase.h.
Referenced by clang::Sema::ActOnFields(), clang::ODRHash::AddDecl(), clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), clang::ASTDeclReader::attachLatestDecl(), clang::ASTDeclReader::attachPreviousDecl(), clang::Sema::BuildDeclarationNameExpr(), castToDeclContext(), clang::comments::Sema::checkReturnsCommand(), clang::OMPThreadPrivateDecl::classof(), clang::TranslationUnitDecl::classof(), clang::PragmaCommentDecl::classof(), clang::AccessSpecDecl::classof(), clang::OMPDeclareReductionDecl::classof(), clang::FriendDecl::classof(), clang::PragmaDetectMismatchDecl::classof(), clang::ExternCContextDecl::classof(), clang::NamedDecl::classof(), clang::TemplateDecl::classof(), clang::LabelDecl::classof(), clang::ObjCMethodDecl::classof(), clang::NamespaceDecl::classof(), clang::ValueDecl::classof(), clang::ObjCTypeParamDecl::classof(), clang::DeclaratorDecl::classof(), clang::ObjCPropertyDecl::classof(), clang::RedeclarableTemplateDecl::classof(), clang::ObjCContainerDecl::classof(), clang::FunctionTemplateDecl::classof(), clang::VarDecl::classof(), clang::NonTypeTemplateParmDecl::classof(), clang::ImplicitParamDecl::classof(), clang::TemplateTemplateParmDecl::classof(), clang::ParmVarDecl::classof(), clang::BuiltinTemplateDecl::classof(), clang::CXXRecordDecl::classof(), clang::ObjCInterfaceDecl::classof(), clang::ClassTemplateSpecializationDecl::classof(), clang::DeclContext::classof(), clang::CXXDeductionGuideDecl::classof(), clang::ObjCIvarDecl::classof(), clang::ObjCAtDefsFieldDecl::classof(), clang::ClassTemplatePartialSpecializationDecl::classof(), clang::CXXMethodDecl::classof(), clang::ObjCProtocolDecl::classof(), clang::ClassTemplateDecl::classof(), clang::FriendTemplateDecl::classof(), clang::ObjCCategoryDecl::classof(), clang::FunctionDecl::classof(), clang::ObjCImplDecl::classof(), clang::TypeAliasTemplateDecl::classof(), clang::ObjCCategoryImplDecl::classof(), clang::ClassScopeFunctionSpecializationDecl::classof(), clang::CXXConstructorDecl::classof(), clang::FieldDecl::classof(), clang::EnumConstantDecl::classof(), clang::CXXDestructorDecl::classof(), clang::ObjCImplementationDecl::classof(), clang::IndirectFieldDecl::classof(), clang::ObjCCompatibleAliasDecl::classof(), clang::CXXConversionDecl::classof(), clang::TypeDecl::classof(), clang::VarTemplateSpecializationDecl::classof(), clang::LinkageSpecDecl::classof(), clang::ObjCPropertyImplDecl::classof(), clang::TypedefNameDecl::classof(), clang::TypedefDecl::classof(), clang::TypeAliasDecl::classof(), clang::VarTemplatePartialSpecializationDecl::classof(), clang::UsingDirectiveDecl::classof(), clang::NamespaceAliasDecl::classof(), clang::VarTemplateDecl::classof(), clang::UsingShadowDecl::classof(), clang::TagDecl::classof(), clang::ConstructorUsingShadowDecl::classof(), clang::UsingDecl::classof(), clang::EnumDecl::classof(), clang::UsingPackDecl::classof(), clang::UnresolvedUsingValueDecl::classof(), clang::RecordDecl::classof(), clang::FileScopeAsmDecl::classof(), clang::UnresolvedUsingTypenameDecl::classof(), clang::StaticAssertDecl::classof(), clang::BindingDecl::classof(), clang::DecompositionDecl::classof(), clang::MSPropertyDecl::classof(), clang::CapturedDecl::classof(), clang::ExportDecl::classof(), clang::EmptyDecl::classof(), compareDeclarations(), clang::ASTReader::CompleteRedeclChain(), computeLVForDecl(), clang::NamedDecl::declarationReplaces(), dumpPreviousDecl(), clang::CodeGen::CodeGenFunction::EmitDecl(), clang::CodeGen::CodeGenModule::EmitDeferredUnusedCoverageMappings(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::comments::DeclInfo::fill(), clang::ASTReader::FindExternalLexicalDecls(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCIvarDecl::getContainingInterface(), clang::getCursorKindForDecl(), clang::ast_type_traits::ASTNodeKind::getFromNode(), getKind(), clang::ASTDeclReader::getMostRecentDecl(), clang::index::getSymbolInfo(), clang::NamedDecl::getUnderlyingDecl(), clang::Sema::isCopyElisionCandidate(), clang::VarDecl::isFileVarDecl(), clang::VarDecl::isFunctionOrMethodVarDecl(), isInstantiationOf(), clang::VarDecl::isLocalVarDecl(), clang::VarDecl::isLocalVarDeclOrParm(), clang::comments::Sema::isObjCPropertyDecl(), isSameEntity(), isSameTemplateParameter(), clang::VarDecl::isStaticDataMember(), isTemplateParameter(), clang::ODRHash::isWhitelistedDecl(), MatchTemplateParameterKind(), clang::ento::CheckerManager::runCheckersOnASTDecl(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::declvisitor::Base< declvisitor::make_ptr, ASTNodeImporter, Decl * >::Visit(), ODRDeclVisitor::Visit(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclReader::VisitRedeclarableTemplateDecl(), and clang::ASTDeclWriter::VisitVarDecl().
|
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 796 of file DeclBase.h.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckFunctionTemplateSpecialization(), checkTupleLikeDecomposition(), clang::ASTReader::CompleteRedeclChain(), clang::DeclContext::containsDecl(), DiagUninitUse(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), clang::ASTWriter::getAnonymousDeclarationNumber(), getContextForScopeMatching(), clang::ASTContext::getInlineVariableDefinitionKind(), clang::Sema::getTemplateInstantiationArgs(), clang::Sema::HandleDelayedAccessCheck(), clang::Sema::hasVisibleMemberSpecialization(), clang::ASTNodeImporter::ImportDeclParts(), clang::index::IndexingContext::indexBody(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), clang::index::IndexingContext::indexTypeLoc(), clang::Sema::InstantiateVariableDefinition(), isExported(), clang::VarDecl::isFileVarDecl(), clang::VarDecl::isFunctionOrMethodVarDecl(), clang::VarDecl::isInExternCContext(), clang::FunctionDecl::isInExternCContext(), clang::VarDecl::isInExternCXXContext(), clang::FunctionDecl::isInExternCXXContext(), isLexicallyWithinFunctionOrMethod(), clang::VarDecl::isLocalVarDecl(), isOutOfLine(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), mergeTypeWithPrevious(), clang::Sema::MergeVarDecl(), clang::serialization::needsAnonymousDeclarationNumber(), clang::Sema::PushOnScopeChains(), RedeclForcesDefC99(), clang::Sema::RegisterLocallyScopedExternCDecl(), clang::DeclContext::removeDecl(), setLexicalDeclContext(), clang::Sema::shouldLinkDependentDeclWithPrevious(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::ASTNodeImporter::VisitLinkageSpecDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTDeclWriter::VisitVarDecl(), clang::ASTDeclReader::VisitVarDeclImpl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
|
inline |
Definition at line 801 of file DeclBase.h.
|
inline |
Get the local owning module, if known.
Returns nullptr if owner is not yet known or declaration is not from a module.
Definition at line 716 of file DeclBase.h.
|
inline |
Definition at line 407 of file DeclBase.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCapturedRegionError(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCompatibilityAlias(), clang::Sema::ActOnCompoundStmt(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnDefs(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnForwardClassDeclaration(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnLabelStmt(), clang::Sema::ActOnLambdaError(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnNamespaceAliasDef(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), ActOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDeclareReductionCombinerStart(), clang::Sema::ActOnOpenMPDeclareReductionDirectiveStart(), clang::Sema::ActOnOpenMPDeclareReductionInitializerStart(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPRegionEnd(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPopScope(), clang::Sema::ActOnPragmaRedefineExtname(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnPureSpecifier(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnStartProtocolInterface(), clang::Sema::ActOnSuperClassOfClassInterface(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnVariableDeclarator(), clang::ASTUnit::addFileLevelDecl(), addFunctionPointerConversion(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::AddInitializerToDecl(), addInstantiatedParametersToScope(), clang::Sema::AddKnownFunctionAttributes(), applyObjCTypeArgs(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::Sema::AtomicPropertySetterGetterRules(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildClassMessage(), buildCoawaitCalls(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXNew(), clang::Sema::BuildDeclarationNameExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), clang::Sema::buildInitCaptureField(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildLambdaExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildMicrosoftCAnonymousStruct(), BuildNonArrayForRange(), buildStdNoThrowDeclRef(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::Sema::BuildUnaryTransformType(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::ObjCMethodCall::canBeOverridenInSubclass(), captureInBlock(), captureInLambda(), checkAddressOfFunctionIsAvailable(), CheckAnonMemberRedeclaration(), clang::Sema::CheckARCMethodDecl(), checkARCPropertyImpl(), checkAtomicPropertyMismatch(), checkAttributesAfterMerging(), clang::Sema::CheckBaseSpecifier(), clang::threadSafety::BeforeSet::checkBeforeAfter(), clang::Sema::CheckCallReturnType(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprFunction(), clang::Sema::CheckConstexprFunctionBody(), clang::Sema::CheckConstexprFunctionDecl(), CheckConstexprParameterTypes(), clang::Sema::CheckConstructor(), clang::Sema::checkCUDATargetOverload(), clang::Sema::CheckCXXDefaultArgExpr(), clang::Sema::CheckCXXDefaultArguments(), checkDeclInTargetContext(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDeductionGuideTemplate(), clang::Sema::CheckDestructor(), checkDirectCallValidity(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckEquivalentExceptionSpec(), CheckExplicitInstantiationScope(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::CheckFieldDecl(), CheckForDanglingReferenceOrPointer(), CheckForDuplicateEnumValues(), clang::Sema::CheckForFunctionRedefinition(), checkForMultipleExportedDefaultConstructors(), CheckForReference(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), clang::Sema::CheckImplementationIvars(), clang::Sema::checkInitMethod(), checkIsValidOpenCLKernelParameter(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckMain(), checkMemberDecomposition(), clang::Sema::CheckMemberSpecialization(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::Sema::checkMSInheritanceAttrOnDefinition(), clang::Sema::CheckMSVCRTEntryPoint(), checkNewAttributesAfterDef(), clang::Sema::CheckNontrivialField(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::checkNullabilityTypeSpecifier(), clang::Sema::CheckObjCBridgeRelatedConversions(), clang::Sema::CheckObjCDeclScope(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCMethodOverrides(), checkObjCUnusedIvar(), clang::Sema::CheckOpenMPLinearDecl(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionAttributes(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::checkPartialSpecializationVisibility(), CheckPoppedLabel(), checkPropertyDeclWithOwnership(), clang::Sema::CheckPureMethod(), clang::Sema::checkRetainCycles(), CheckReturnStackAddr(), clang::Sema::CheckShadow(), clang::Sema::CheckShadowingDeclModification(), checkSimpleDecomposition(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSpecializationInstantiationRedecl(), clang::Sema::CheckSwitchCondition(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTemplateParameterList(), CheckTemplateSpecializationScope(), clang::Sema::CheckTemplateTypeArgument(), CheckTrivialDefaultConstructor(), checkTrivialSubobjectCall(), checkTupleLikeDecomposition(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckTypenameType(), checkTypeParamListConsistency(), checkUndefinedButUsed(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::CheckUsingShadowDecl(), checkUsingShadowRedecl(), clang::Sema::checkVarDeclRedefinition(), clang::Sema::CheckVariableDeclarationType(), compare(), clang::Sema::CompleteMemberSpecialization(), ConvertDeducedTemplateArgument(), ConvertDeducedTemplateArguments(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), DeduceNullPtrTemplateArgument(), clang::Sema::DeduceReturnType(), clang::Sema::deduceVarTypeFromInitializer(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), clang::Sema::DefineUsedVTables(), DelegatingCycleHelper(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseAmbiguousLookup(), diagnoseArityMismatch(), DiagnoseArityMismatch(), clang::Sema::DiagnoseAssignmentResult(), clang::Sema::DiagnoseAutoDeductionFailure(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseCalleeStaticArrayParam(), clang::Sema::DiagnoseClassExtensionDupMethods(), DiagnoseConstAssignment(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), diagnoseDeprecatedCopyOperation(), DiagnoseDirectIsaAccess(), clang::Sema::DiagnoseDuplicateIvars(), clang::Sema::diagnoseEquivalentInternalLinkageDeclarations(), clang::Sema::diagnoseExprIntendedAsTemplateName(), DiagnoseFailedEnableIfAttr(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Sema::DiagnoseHiddenVirtualMethods(), DiagnoseInvalidRedeclaration(), clang::Sema::DiagnoseMissingDesignatedInitOverrides(), clang::Sema::diagnoseMissingImport(), DiagnoseNamespaceInlineMismatch(), clang::Sema::DiagnoseNontrivial(), DiagnoseObjCImplementedDeprecations(), DiagnoseOpenCLExtensionDisabled(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseShadowingLambdaDecls(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::Sema::DiagnoseTemplateParameterShadow(), diagnoseUncapturableValueReference(), DiagnoseUnimplementedAccessor(), DiagnoseUninitializedUse(), clang::Sema::DiagnoseUninstantiableTemplate(), clang::Sema::DiagnoseUnusedBackingIvarInAccessor(), clang::Sema::DiagnoseUnusedDecl(), clang::Sema::DiagnoseUseOfDecl(), diagnoseVarDeclTypeMismatch(), diagReturnOnAllocFailure(), DiagUninitUse(), DoEmitAvailabilityWarning(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCombinerOrInitializer(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), EmitDiagForCXXThrowInNonThrowingFunc(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CGDebugInfo::EmitImportDecl(), clang::CodeGen::CGDebugInfo::EmitInlineFunctionStart(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), emitOutlinedFunctionPrologue(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), clang::Expr::EvaluateAsInitializer(), evaluateVarDeclInit(), clang::Expr::EvaluateWithSubstitution(), clang::Sema::FinalizeDeclaration(), clang::Sema::FinalizeDeclaratorGroup(), clang::Sema::FinalizeVarWithDestructor(), clang::Sema::FindAllocationFunctions(), FindBaseInitializer(), findCompleteObject(), findDefaultInitializer(), clang::Sema::findInheritingConstructor(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FindProtocolDeclaration(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(), clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::AccessSpecDecl::getAccessSpecifierLoc(), clang::NamespaceAliasDecl::getAliasLoc(), clang::FileScopeAsmDecl::getAsmLoc(), clang::BlockDecl::getCaretLocation(), GetDeclSpecTypeForDeclarator(), clang::Sema::getDestructorName(), clang::ObjCInterfaceDecl::getEndOfDefinitionLoc(), clang::ExportDecl::getExportLoc(), GetFullTypeForDeclarator(), clang::UsingDirectiveDecl::getIdentLocation(), getInitializationLoc(), GetLocationForCandidate(), clang::LinkageSpecDecl::getLocEnd(), clang::ExportDecl::getLocEnd(), clang::ObjCMethodDecl::getLocStart(), clang::FunctionDecl::getNameInfo(), clang::UsingDecl::getNameInfo(), clang::UnresolvedUsingValueDecl::getNameInfo(), clang::UnresolvedUsingTypenameDecl::getNameInfo(), clang::ASTContext::getRawCommentForDeclNoCache(), clang::CXXCtorInitializer::getSourceLocation(), clang::ASTReader::getSourceLocationForDeclID(), clang::FriendDecl::getSourceRange(), clang::ObjCMethodDecl::getSourceRange(), clang::LabelDecl::getSourceRange(), clang::ObjCTypeParamDecl::getSourceRange(), clang::DeclaratorDecl::getSourceRange(), clang::ObjCPropertyDecl::getSourceRange(), clang::VarDecl::getSourceRange(), clang::ObjCInterfaceDecl::getSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::ObjCProtocolDecl::getSourceRange(), clang::EnumConstantDecl::getSourceRange(), clang::TypeDecl::getSourceRange(), clang::ObjCPropertyImplDecl::getSourceRange(), clang::TypedefDecl::getSourceRange(), clang::UsingDirectiveDecl::getSourceRange(), clang::TagDecl::getSourceRange(), clang::StaticAssertDecl::getSourceRange(), clang::BlockDecl::getSourceRange(), clang::ImportDecl::getSourceRange(), clang::ExportDecl::getSourceRange(), getTupleLikeElementType(), clang::Sema::getTypeName(), clang::ento::MemRegionManager::getVarRegion(), getVarTemplateSpecialization(), handleAVRInterruptAttr(), handleAVRSignalAttr(), handleCleanupAttr(), clang::index::IndexingContext::handleDecl(), handleFormatAttr(), handleMipsInterruptAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), clang::Sema::HandlePropertyInClassExtension(), handleTransparentUnionAttr(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), clang::Sema::ImplMethodsVsClassMethods(), clang::ASTNodeImporter::ImportDeclParts(), clang::ASTNodeImporter::ImportDefinition(), clang::index::IndexingContext::importedModule(), clang::index::IndexingContext::indexTopLevelDecl(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::Sema::inferObjCARCLifetime(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::Sema::isAcceptableTagRedeclaration(), IsCXXRecordForMappable(), clang::TagTypeLoc::isDefinition(), isForbiddenTypeAllowed(), clang::LabelDecl::isGnuLocal(), clang::Sema::isIncompatibleTypedef(), clang::ento::CallEvent::isInSystemHeader(), clang::ObjCPropertyImplDecl::isIvarNameSpecified(), isNullPointerValueTemplateArgument(), clang::Sema::IsOverload(), clang::Expr::isPotentialConstantExpr(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), isVariableCapturable(), lookupCoroutineHandleType(), clang::Sema::LookupInObjCMethod(), lookupPromiseType(), clang::Sema::LookupSpecialMember(), LookupStdInitializerList(), lookupStdTypeTraitMember(), clang::Sema::LookupTemplateName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MatchAllMethodDeclarations(), MatchTemplateParameterKind(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), clang::RecordDecl::mayInsertExtraPadding(), mergeAlignedAttrs(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::mergeDeclAttributes(), clang::Sema::MergeFunctionDecl(), mergeInterfaceMethodToImpl(), mergeParamDeclAttributes(), mergeParamDeclTypes(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::NoteDeletedFunction(), clang::Sema::NoteDeletedInheritingConstructor(), NoteFunctionCandidate(), clang::Sema::NoteHiddenVirtualMethods(), NoteLValueLocation(), noteNonDeducibleParameters(), clang::Sema::NoteOverloadCandidate(), noteOverloads(), clang::Sema::notePreviousDefinition(), NoteSurrogateCandidate(), clang::Sema::ParseObjCSelectorExpression(), clang::Sema::ParseTypedefDecl(), clang::Sema::PerformOpenMPImplicitIntegerConversion(), clang::PrettyDeclStackTraceEntry::print(), clang::PrettyStackTraceDecl::print(), ProcessDeclAttribute(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), clang::Sema::propagateDLLAttrToBaseClassTemplate(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildObjCExceptionDecl(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), ReferenceDllExportedMethods(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), ReportOriginalDSA(), ReportOverrides(), clang::Sema::RequireLiteralType(), rewriteBuiltinFunctionDecl(), rewriteToObjCInterfaceDecl(), clang::consumed::ConsumedAnalyzer::run(), selectBestPath(), SelectPropertyForSynthesisFromProtocols(), clang::CodeGen::CodeGenFunction::setBlockContextParameter(), clang::Sema::SetCtorInitializers(), clang::Sema::SetDeclDeleted(), clang::Sema::SetIvarInitializers(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::SetParamDefaultArgument(), clang::Sema::setTagNameForLinkagePurposes(), clang::Sema::ShouldDeleteSpecialMember(), shouldIgnoreDueToReservedName(), clang::Sema::SpecialMemberIsTrivial(), clang::Sema::startLambdaDefinition(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::Sema::SubstParmVarDecl(), SuggestInitializationFixit(), clang::TreeTransform< Derived >::TransformCondition(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::threadSafety::SExprBuilder::translateAttrExpr(), clang::Sema::tryCaptureVariable(), TryDiagnoseProtectedAccess(), clang::Sema::UnifySection(), validateBoxingMethod(), ValidateObjCLiteralInterfaceDecl(), clang::Sema::VerifyIntegerConstantExpression(), clang::ASTNodeImporter::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitLabelDecl(), clang::ASTNodeImporter::VisitLinkageSpecDecl(), clang::tooling::RecursiveSymbolVisitor< T >::VisitNamedDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitObjCTypeParamDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitStaticAssertDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl(), clang::Sema::WarnConflictingTypedMethods(), clang::Sema::WarnExactTypedMethods(), and warnOnLifetimeExtension().
|
inline |
Definition at line 403 of file DeclBase.h.
References clang::SourceRange::getEnd(), and clang::tooling::fixit::internal::getSourceRange().
Referenced by clang::Sema::ActOnFinishFunctionBody(), checkTypeParamListConsistency(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), GenerateFixForUnusedDecl(), clang::CoroutineBodyStmt::getLocEnd(), clang::LinkageSpecDecl::getLocEnd(), clang::OMPCapturedExprDecl::getSourceRange(), clang::ExportDecl::getSourceRange(), getValidSourceLocation(), HandleFunctionCall(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), maybeRecoverWithZeroInitialization(), rewriteToNSEnumDecl(), rewriteToNSMacroDecl(), SuggestInitializationFixit(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTDeclWriter::VisitImportDecl().
|
inline |
Definition at line 400 of file DeclBase.h.
References clang::SourceRange::getBegin(), and clang::tooling::fixit::internal::getSourceRange().
Referenced by clang::Sema::ActOnPropertyImplDecl(), clang::Sema::AddNSConsumedAttr(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), clang::Sema::checkObjCBridgeRelatedComponents(), clang::Sema::CheckObjCBridgeRelatedConversions(), CheckUnreachable(), clang::ento::PathDiagnosticLocation::createBegin(), clang::Sema::diagnoseNullResettableSynthesizedSetters(), clang::CodeGen::CodeGenModule::EmitDeferredUnusedCoverageMappings(), GenerateFixForUnusedDecl(), clang::ASTContext::getRawCommentForDeclNoCache(), handleAnyX86InterruptAttr(), handleNSReturnsRetainedAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCOwnershipAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handlePassObjectSizeAttr(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), clang::InitializationSequence::Perform(), clang::Sema::PrintPragmaAttributeInstantiationPoint(), clang::ASTDeclWriter::VisitLabelDecl(), clang::ASTNodeImporter::VisitLabelDecl(), clang::ASTDeclWriter::VisitOMPDeclareReductionDecl(), clang::ASTDeclWriter::VisitPragmaCommentDecl(), clang::ASTDeclWriter::VisitPragmaDetectMismatchDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().
| unsigned Decl::getMaxAlignment | ( | ) | const |
getMaxAlignment - return the maximum alignment specified by attributes on this decl, 0 if there are none.
Definition at line 354 of file DeclBase.cpp.
References E, getASTContext(), getAttrs(), hasAttrs(), I, and max().
Referenced by clang::ASTContext::getDeclAlign(), getDeclAlignIfRequired(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
|
inline |
Get the kind of module ownership for this declaration.
Definition at line 757 of file DeclBase.h.
Referenced by clang::Sema::hasMergedDefinitionInCurrentModule(), isExportedFromModuleIntefaceUnit(), and setLexicalDeclContext().
|
inline |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration).
Definition at line 937 of file DeclBase.h.
Referenced by clang::ASTDeclWriter::AddFirstDeclFromEachModule(), forAllLaterRedecls(), isUsed(), clang::Sema::mergeDeclAttributes(), and clang::ASTDeclWriter::VisitRedeclarable().
|
inline |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration).
Definition at line 941 of file DeclBase.h.
|
inlineprotectedvirtual |
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 862 of file DeclBase.h.
|
inline |
Definition at line 413 of file DeclBase.h.
Referenced by clang::DeclContext::addHiddenDecl(), IsTailPaddedMemberArray(), clang::DeclContext::localUncachedLookup(), and clang::DeclContext::decl_iterator::operator++().
|
inline |
Definition at line 414 of file DeclBase.h.
|
inlineprotectedvirtual |
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 854 of file DeclBase.h.
| Decl * Decl::getNonClosureContext | ( | ) |
Find the innermost non-closure ancestor of this declaration, walking up through blocks, lambdas, etc.
If that ancestor is not a code context (!isFunctionOrMethod()), returns null.
A declaration may be its own non-closure context.
Definition at line 940 of file DeclBase.cpp.
References getNonClosureContext().
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), and clang::CodeGen::CodeGenFunction::StartFunction().
|
inline |
Definition at line 431 of file DeclBase.h.
References getNonClosureContext().
|
inline |
Get the module that owns this declaration.
Definition at line 737 of file DeclBase.h.
Referenced by clang::Sema::ActOnTag(), getExternalLinkageFor(), getInternalLinkageFor(), clang::Sema::getOwningModule(), isExportedFromModuleIntefaceUnit(), clang::Sema::notePreviousDefinition(), setLexicalDeclContext(), and clang::ASTDeclWriter::VisitDecl().
|
inline |
Retrieve the global ID of the module that owns this particular declaration.
Definition at line 693 of file DeclBase.h.
Referenced by clang::ASTReader::mergeDefinitionVisibility().
| 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 222 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::isTranslationUnit().
Referenced by basicGVALinkageForVariable(), clang::Sema::FinalizeDeclaration(), and clang::index::isFunctionLocalSymbol().
|
inline |
Definition at line 835 of file DeclBase.h.
|
inline |
Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Definition at line 922 of file DeclBase.h.
Referenced by clang::ASTDeclWriter::AddFirstDeclFromEachModule(), clang::Sema::ArgumentDependentLookup(), clang::Sema::CheckSpecializationInstantiationRedecl(), clang::DeclContext::collectAllContexts(), diagnoseBadDirectAccess(), DiagnoseNamespaceInlineMismatch(), DoEmitAvailabilityWarning(), clang::LocalInstantiationScope::findInstantiationOf(), forAllLaterRedecls(), getDeclForLocalLookup(), clang::ASTWriter::getFirstLocalDecl(), getPreviousDeclForInstantiation(), clang::Sema::InstantiateFunctionDefinition(), isPreferredLookupResult(), and clang::ASTDeclWriter::VisitRedeclarable().
|
inline |
Retrieve the most recent declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Definition at line 926 of file DeclBase.h.
|
inlineprotectedvirtual |
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 858 of file DeclBase.h.
|
inlinevirtual |
Source range that this declaration covers.
Reimplemented in clang::ExportDecl, clang::ImportDecl, clang::BlockDecl, clang::StaticAssertDecl, clang::FileScopeAsmDecl, clang::UnresolvedUsingValueDecl, clang::UsingPackDecl, clang::UsingDecl, clang::NamespaceAliasDecl, clang::TagDecl, clang::UsingDirectiveDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::LinkageSpecDecl, clang::ObjCPropertyImplDecl, clang::TypeDecl, clang::EnumConstantDecl, clang::FieldDecl, clang::ObjCProtocolDecl, clang::ClassTemplateSpecializationDecl, clang::FunctionDecl, clang::BuiltinTemplateDecl, clang::TemplateTemplateParmDecl, clang::ParmVarDecl, clang::NonTypeTemplateParmDecl, clang::ObjCInterfaceDecl, clang::TemplateTypeParmDecl, clang::ObjCContainerDecl, clang::VarDecl, clang::ObjCPropertyDecl, clang::DeclaratorDecl, clang::ObjCTypeParamDecl, clang::NamespaceDecl, clang::LabelDecl, clang::TemplateDecl, clang::ObjCMethodDecl, clang::OMPCapturedExprDecl, clang::FriendDecl, and clang::AccessSpecDecl.
Definition at line 397 of file DeclBase.h.
Referenced by clang::Sema::AddAlignValueAttr(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::checkOpenCLDisabledDecl(), ConvertDeducedTemplateArgument(), clang::Sema::DiagnoseMisalignedMembers(), clang::UsingPackDecl::getSourceRange(), handleOpenCLAccessAttr(), and warnAboutAmbiguousFunction().
| TranslationUnitDecl * Decl::getTranslationUnitDecl | ( | ) |
Definition at line 331 of file DeclBase.cpp.
References getDeclContext(), clang::DeclContext::getParent(), and clang::DeclContext::isTranslationUnit().
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinNewDeleteCall(), getASTContext(), and clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().
|
inline |
Definition at line 436 of file DeclBase.h.
| VersionTuple Decl::getVersionIntroduced | ( | ) | const |
Retrieve the version of the target platform in which this declaration was introduced.
Definition at line 609 of file DeclBase.cpp.
References attrs(), Context, getASTContext(), clang::TargetInfo::getPlatformName(), getRealizedPlatform(), and clang::ASTContext::getTargetInfo().
|
inline |
Definition at line 521 of file DeclBase.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFinishNamespaceDef(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCExceptionDecl(), ActOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPragmaWeakAlias(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddCFAuditedAttribute(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddOptnoneAttributeIfNoConflicts(), adjustGVALinkageForAttributes(), AllowOverloadingOfFunction(), clang::Sema::AreMultipleMethodsInGlobalPool(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), assignInheritanceModel(), clang::Sema::AttachBaseSpecifiers(), basicGVALinkageForFunction(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildResolvedCallExpr(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::canCalleeThrow(), canRedefineFunction(), captureInBlock(), clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), checkDeclInTargetContext(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::comments::Sema::checkDeprecatedCommand(), checkForIBOutlets(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckMain(), CheckMemberPointerConstantExpression(), clang::Sema::CheckMessageArgumentTypes(), CheckNakedParmReference(), CheckNonNullArguments(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverrideControl(), CheckProtocolMethodDefs(), checkRecordTypeForCapability(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), clang::Sema::CheckTransparentUnionArgumentConstraints(), checkTypedefTypeForCapability(), checkUndefinedButUsed(), checkValueDeclInTarget(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CheckVirtualDtorCall(), clang::Sema::CodeCompleteLambdaIntroducer(), compareEnableIfAttrs(), computeKeyFunction(), computeLVForDecl(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::Sema::CUDASetLambdaAttrs(), clang::DeclAttrsMatchCUDAMode(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseAssignmentEnum(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), DiagnoseUninitializedUse(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitDelegateCallArg(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), EmitFunctionDeclPointer(), clang::CodeGen::CodeGenModule::EmitGlobal(), EmitGlobalVarDeclLValue(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), EvaluateUnaryTypeTrait(), clang::Sema::FinalizeDeclaration(), findProtocolsWithExplicitImpls(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::ASTContext::getBlockVarCopyInits(), clang::CodeGen::CodeGenModule::getBuiltinLibFunction(), getCallingConventionForDecl(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), clang::ASTContext::getDeclAlign(), getDeclAlignIfRequired(), clang::CXXMethodDecl::getDevirtualizedMethod(), clang::getDLLAttr(), GetFullTypeForDeclarator(), clang::CodeGen::CodeGenModule::GetGlobalVarAddressSpace(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), clang::LinkageComputer::getLVForDecl(), clang::index::getSymbolInfo(), getTypeInfoLinkage(), clang::Sema::getUndefinedButUsed(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::CodeGen::CodeGenModule::HandleCXXStaticMemberVarInstantiation(), handleDelayedForbiddenType(), handleOpenCLAccessAttr(), handlePassObjectSizeAttr(), hasDirectVisibilityAttribute(), clang::CodeGen::CodeGenModule::HasHiddenLTOVisibility(), hasObjCExceptionAttribute(), clang::Expr::HasSideEffects(), clang::Sema::IdentifyCUDATarget(), clang::InitializedEntity::InitializeParameter(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateVariableInitializer(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::ObjCInterfaceDecl::isArcWeakrefUnavailable(), isBlockVarRef(), isClassOrMethodDLLImport(), clang::Sema::isCopyElisionCandidate(), isFunctionDefinitionDiscarded(), clang::Type::isIncompleteType(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), isRequiredDecl(), isTestingFunction(), IsTransparentUnionStandardConversion(), isVarDeclStrongDefinition(), isVariableCapturable(), clang::Sema::makeUnavailableInSystemHeader(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MatchTwoMethodDeclarations(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), clang::Sema::MaybeBindToTemporary(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::MergeFunctionDecl(), mergeInterfaceMethodToImpl(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), clang::ASTContext::mergeTransparentUnionType(), clang::Sema::MergeVarDecl(), clang::ASTContext::ObjCMethodsAreEqual(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), pushTemporaryCleanup(), RecordModifiableNonNullParam(), recordUsesEBO(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::CodeGen::CodeGenModule::setAliasAttributes(), clang::ASTContext::setBlockVarCopyInits(), clang::CodeGen::CodeGenModule::SetCommonAttributes(), setLinkageAndVisibilityForGV(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), shouldBeInCOMDAT(), shouldConsiderTemplateVisibility(), ShouldDiagnoseSwitchCaseNotInEnum(), ShouldDiagnoseUnusedDecl(), shouldExtendReceiverForInnerPointerMessage(), clang::CodeGen::CodeGenFunction::ShouldInstrumentFunction(), clang::MangleContext::shouldMangleDeclName(), ShouldUseExternalRTTIDescriptor(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), SuggestInitializationFixit(), useFirstFieldIfTransparentUnion(), useInlineVisibilityHidden(), clang::ento::SValExplainer::VisitVarRegion(), and clang::Sema::WarnExactTypedMethods().
|
inline |
Definition at line 462 of file DeclBase.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFields(), ActOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), AttributesMatch(), clang::Sema::BuildReturnStmt(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckFieldDecl(), checkNewAttributesAfterDef(), clang::Sema::CheckVariableDeclarationType(), createPrivatesRecordDecl(), DeclContainsAttr(), getMaxAlignment(), getOrderedEnableIfAttrs(), hasAttr(), clang::ASTImporter::Imported(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), clang::MangleContext::shouldMangleDeclName(), clang::ASTDeclReader::UpdateDecl(), clang::ASTDeclWriter::VisitCXXMethodDecl(), 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().
|
inlinevirtual |
Returns true if this Decl represents a declaration for a body of code, such as a function or method definition.
Note that hasBody can also return true if any redeclaration of this Decl represents a declaration for a body of code.
Reimplemented in clang::FunctionDecl, and clang::ObjCMethodDecl.
Definition at line 954 of file DeclBase.h.
Referenced by clang::CloneDetector::analyzeCodeBody(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), emitOutlinedFunctionPrologue(), GenerateAlternateExtensivePathDiagnostic(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::FunctionDecl::hasBody(), hasImplicitBody(), clang::CallGraph::includeInGraph(), and clang::ento::CheckerManager::runCheckersOnASTBody().
|
inlineprotected |
Definition at line 390 of file DeclBase.h.
Referenced by clang::LinkageComputer::getLVForDecl(), clang::NamedDecl::hasLinkageBeenComputed(), and clang::NamedDecl::isLinkageValid().
| bool Decl::hasDefiningAttr | ( | ) | const |
Return true if this declaration has an attribute which acts as definition of the entity, such as 'alias' or 'ifunc'.
Definition at line 441 of file DeclBase.cpp.
Referenced by clang::VarDecl::isThisDeclarationADefinition(), and clang::FunctionDecl::isThisDeclarationADefinition().
|
protected |
Definition at line 98 of file DeclBase.cpp.
References getASTContext(), clang::ASTContext::getLangOpts(), and clang::LangOptions::trackLocalOwningModule().
|
inline |
Is this declaration owned by some module?
Definition at line 732 of file DeclBase.h.
Referenced by setLexicalDeclContext().
|
inline |
Definition at line 778 of file DeclBase.h.
Referenced by clang::StoredDeclsList::AddSubsequentDecl().
|
inline |
Whether this particular Decl is a canonical one.
Definition at line 847 of file DeclBase.h.
References getCanonicalDecl().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::ASTContext::addOverriddenMethod(), clang::CXXMethodDecl::addOverriddenMethod(), clang::ClassTemplateDecl::AddPartialSpecialization(), clang::VarTemplateDecl::AddPartialSpecialization(), clang::RedeclarableTemplateDecl::addSpecializationImpl(), getCanonicalDecl(), clang::ASTDeclWriter::VisitClassTemplateSpecializationDecl(), clang::ASTDeclReader::VisitClassTemplateSpecializationDeclImpl(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::ASTDeclReader::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTDeclReader::VisitFunctionDecl(), clang::ASTDeclWriter::VisitVarTemplateSpecializationDecl(), and clang::ASTDeclReader::VisitVarTemplateSpecializationDeclImpl().
|
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 819 of file DeclBase.h.
Referenced by clang::Sema::InstantiateClass(), clang::Sema::LookupInObjCMethod(), and LookupPotentialTypoResult().
|
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 650 of file DeclBase.h.
References clang::AR_Deprecated.
Referenced by clang::Sema::addMethodToGlobalList().
| bool Decl::isExported | ( | ) | const |
Whether this declaration is exported (by virtue of being lexically within an ExportDecl or by being a NamespaceDecl).
Definition at line 404 of file DeclBase.cpp.
References getLexicalDeclContext(), clang::DeclContext::getLexicalParent(), and isModulePrivate().
Referenced by clang::Sema::ActOnStartExportDecl().
|
inline |
True if this is the first declaration in its redeclaration chain.
Definition at line 931 of file DeclBase.h.
|
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 681 of file DeclBase.h.
Referenced by clang::ASTContext::addedLocalImportDecl(), clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), compareDeclarations(), clang::NamedDecl::declarationReplaces(), clang::ASTReader::forEachImportedKeyDecl(), getDeclForLocalLookup(), getDeclForMerging(), clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), clang::ASTReader::getKeyDeclaration(), clang::ASTReader::getOwningModuleFile(), clang::Sema::InstantiateFunctionDefinition(), isDefinedInClangModule(), isImportedDeclContext(), clang::ASTWriter::IsLocalDecl(), clang::ASTDeclWriter::RegisterTemplateSpecialization(), setLexicalDeclContext(), and clang::ASTDeclWriter::VisitNamespaceDecl().
|
inline |
Whether this declaration is a function or function template.
Definition at line 980 of file DeclBase.h.
Referenced by clang::Sema::ClassifyName().
|
inline |
Determine whether this declaration might be hidden from name lookup.
Note that the declaration might be visible even if this returns false, if the owning module is visible within the query context.
Definition at line 745 of file DeclBase.h.
Referenced by clang::LookupResult::isVisible(), clang::Sema::isVisible(), clang::ObjCProtocolDecl::lookupMethod(), clang::Sema::MatchTwoMethodDeclarations(), clang::ASTReader::mergeDefinitionVisibility(), and NestedProtocolHasNoDefinition().
|
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 537 of file DeclBase.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXMemberDeclarator(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::Sema::BuildCXXNew(), BuildImplicitMemberInitializer(), clang::Sema::buildOverloadedCallSet(), clang::Sema::CheckDestructor(), checkDLLAttributeRedeclaration(), clang::Sema::CheckObjCMethodOverrides(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), DiagnoseBadTarget(), diagnoseDeprecatedCopyOperation(), clang::CodeGen::CodeGenFunction::EmitDestructorBody(), clang::CodeGen::CGDebugInfo::EmitFunctionDecl(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), clang::Sema::FindAllocationFunctions(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::ASTContext::getBuiltinVaListDecl(), clang::ObjCMethodDecl::getNumSelectorLocs(), clang::ASTContext::getRawCommentForDeclNoCache(), clang::ObjCMethodDecl::getSelectorStartLoc(), hasImplicitBody(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::Sema::IdentifyCUDATarget(), clang::ASTImporter::Imported(), clang::index::IndexingContext::importedModule(), clang::index::IndexingContext::indexDecl(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::ObjCInterfaceDecl::isImplicitInterfaceDecl(), clang::RecordDecl::isInjectedClassName(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), isTrackedVar(), clang::ODRHash::isWhitelistedDecl(), LeastDerivedClassWithSameLayout(), clang::ObjCInterfaceDecl::lookupMethod(), mergeDeclAttribute(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), RedeclForcesDefC99(), clang::ObjCMethodDecl::setMethodParams(), clang::Sema::ShouldDeleteSpecialMember(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::Sema::UseArgumentDependentLookup(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), 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 316 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::getParent().
Referenced by getLVForNamespaceScopeDecl().
Definition at line 773 of file DeclBase.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::LookupResult::getAcceptableDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool Decl::isInStdNamespace | ( | ) | const |
Definition at line 327 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::isStdNamespace().
Referenced by CheckMoveOnConstruction(), clang::Sema::DiagnoseSelfMove(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), IsStdFunction(), IsStdString(), and clang::consumed::ConsumedStmtVisitor::VisitCallExpr().
|
inline |
Definition at line 532 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::ActOnCXXTryBlock(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishCXXMemberDecls(), clang::Sema::ActOnFinishDelayedCXXMethodDeclaration(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnObjCAtCatchStmt(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::BuildCXXDefaultInitExpr(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclaratorGroup(), buildDeclareReductionRef(), BuildImplicitMemberInitializer(), clang::Sema::BuildLambdaExpr(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVarTemplateInstantiation(), CastToDerivedClass(), checkARCPropertyImpl(), CheckArityMismatch(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompletedCoroutineBody(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConditionVariable(), CheckConstexprCtorInitializer(), CheckConstexprFunction(), clang::Sema::CheckConstructor(), clang::Sema::CheckCXXDefaultArguments(), CheckDeclInExpr(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkDLLAttributeRedeclaration(), clang::Sema::CheckFieldDecl(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckParmsForFunctionDef(), checkPropertyDeclWithOwnership(), clang::Sema::CheckPureMethod(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateIdType(), CheckTypeMappable(), clang::Sema::CheckVariableDeclaration(), clang::Sema::CheckVariableDeclarationType(), CollectFieldInitializer(), computeCanPassInRegisters(), ComputeDefaultedSpecialMemberExceptionSpec(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::DeduceVariableDeclarationType(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), DelegatingCycleHelper(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseHiddenVirtualMethods(), DiagnoseReinterpretUpDownCast(), clang::Sema::DiagnoseUnimplementedProperties(), clang::Sema::DiagnoseUninstantiableTemplate(), clang::Sema::FinalizeDeclaration(), clang::Sema::FinalizeVarWithDestructor(), findCompleteObject(), clang::Sema::findInheritingConstructor(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ASTContext::getASTRecordLayout(), clang::ASTContext::getCommentForDecl(), getContainedDynamicClass(), clang::ASTContext::getDeclAlign(), getLVForLocalDecl(), clang::Sema::getUndefinedButUsed(), HandleClassZeroInitialization(), HandleConstructorCall(), clang::Sema::HandleField(), HandleLValueBase(), HandleLValueDirectBase(), HandleLValueMember(), clang::Sema::HandleMSProperty(), handleOpenCLAccessAttr(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateMemInitializers(), clang::Sema::InstantiateVariableDefinition(), IsCXXRecordForMappable(), clang::Sema::IsDerivedFrom(), isDesignatorAtObjectEnd(), clang::FunctionDecl::isImplicitlyInstantiable(), isNonPlacementDeallocationFunction(), clang::Sema::LookupInObjCMethod(), clang::Sema::LookupLiteralOperator(), LookupMemberExpr(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), MatchesFriend(), clang::CXXRecordDecl::mayBeAbstract(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclTypes(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::PerformPendingInstantiations(), clang::Sema::PopParsingDeclaration(), clang::Sema::ProcessPropertyDecl(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::LookupResult::resolveKind(), clang::Sema::SetDeclDefaulted(), clang::Sema::SetIvarInitializers(), clang::Sema::setTagNameForLinkagePurposes(), clang::Sema::ShouldDeleteSpecialMember(), ShouldDiagnoseUnusedDecl(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::Sema::SubstDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), TryRefInitWithConversionFunction(), clang::ASTDeclWriter::VisitCXXMethodDecl(), 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().
| bool Decl::isLexicallyWithinFunctionOrMethod | ( | ) | const |
Returns true if this declaration lexically is inside a function.
It recognizes non-defining declarations as well as members of local classes:
Definition at line 304 of file DeclBase.cpp.
References getLexicalDeclContext(), clang::DeclContext::getLexicalParent(), and clang::DeclContext::isFunctionOrMethod().
Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::Sema::SubstParmVarDecl().
|
inline |
Determine whether this is a block-scope declaration with linkage.
This will either be a local variable declaration declared 'extern', or a local function declaration.
Definition at line 1020 of file DeclBase.h.
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildVariableInstantiation(), checkDLLAttributeRedeclaration(), clang::Sema::HandleDeclarator(), clang::Sema::HandleDelayedAccessCheck(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
inline |
Whether this declaration was marked as being private to the module in which it was defined.
Definition at line 586 of file DeclBase.h.
Referenced by isExported(), 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 |
Determine whether this declaration is declared out of line (outside its semantic context).
Reimplemented in clang::FunctionDecl, and clang::VarDecl.
Definition at line 44 of file Decl.cpp.
References clang::DeclContext::Equals(), getDeclContext(), and getLexicalDeclContext().
Referenced by clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnCXXExitDeclInitializer(), checkDeclInTargetContext(), clang::Sema::InstantiateVariableDefinition(), clang::VarDecl::isOutOfLine(), clang::FunctionDecl::isOutOfLine(), clang::Sema::PushOnScopeChains(), and clang::ASTDeclWriter::VisitDecl().
| bool Decl::isParameterPack | ( | ) | const |
Whether this declaration is a parameter pack.
Definition at line 192 of file DeclBase.cpp.
References isTemplateParameterPack().
Referenced by clang::Sema::ActOnSizeofParameterPackExpr(), clang::Sema::ActOnStartOfLambdaDefinition(), ConvertDeducedTemplateArguments(), inheritDefaultTemplateArguments(), isSameAsPrimaryTemplate(), and MatchTemplateParameterKind().
| bool Decl::isReferenced | ( | ) | const |
Whether any declaration of this entity was referenced.
Definition at line 392 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::BuildVariableInstantiation(), clang::Sema::DiagnoseUnusedBackingIvarInAccessor(), ShouldDiagnoseUnusedDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), and clang::ASTDeclWriter::VisitVarDecl().
Definition at line 781 of file DeclBase.h.
| bool Decl::isTemplateDecl | ( | ) | const |
returns true if this declaration is a template
Definition at line 207 of file DeclBase.cpp.
|
inline |
isTemplateParameter - Determines whether this declaration is a template parameter.
Definition at line 1906 of file DeclBase.h.
References getKind().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnNamespaceAliasDef(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTag(), clang::Sema::CheckClassTemplate(), clang::Sema::DiagnoseTemplateParameterShadow(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), maybeDiagnoseTemplateParameterShadow(), shouldBeHidden(), and clang::ASTDeclReader::VisitDecl().
| bool Decl::isTemplateParameterPack | ( | ) | const |
isTemplateParameter - Determines whether this declaration is a template parameter pack.
Definition at line 180 of file DeclBase.cpp.
Referenced by checkLiteralOperatorTemplateParameterList(), ConvertDeducedTemplateArguments(), clang::ASTContext::getInjectedTemplateArg(), isParameterPack(), MatchTemplateParameterKind(), clang::TemplateParameterList::TemplateParameterList(), and clang::ASTDeclReader::VisitDecl().
|
inline |
Whether this declaration was referenced.
This should not be relied upon for anything other than debugging.
Definition at line 565 of file DeclBase.h.
|
inline |
Whether this declaration is a top-level declaration (function, global variable, etc.) that is lexically inside an objc container definition.
Definition at line 572 of file DeclBase.h.
Referenced by clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
|
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 659 of file DeclBase.h.
References clang::AR_Unavailable.
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::addMethodToGlobalList(), and clang::Sema::isFunctionConsideredUnavailable().
Whether any (re-)declaration of the entity 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 367 of file DeclBase.cpp.
References getCanonicalDecl(), and getMostRecentDecl().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnPragmaUnused(), clang::Sema::BuildVariableInstantiation(), checkDLLAttributeRedeclaration(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenModule::EmitOMPDeclareReduction(), clang::ASTImporter::Imported(), clang::Sema::MarkFunctionReferenced(), markUsed(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::mergeDeclAttributes(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDecl(), 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::ASTNodeImporter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::ASTNodeImporter::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 653 of file DeclBase.cpp.
References clang::AR_NotYetIntroduced, attrs(), canBeWeakImported(), CheckAvailability(), and getASTContext().
Referenced by clang::ValueDecl::isWeak(), isWeakLinkedClass(), and setLinkageAndVisibilityForGV().
| void Decl::markUsed | ( | ASTContext & | C | ) |
Mark the declaration used, in the sense of odr-use.
This notifies any mutation listeners in addition to setting a bit indicating the declaration is used.
Definition at line 382 of file DeclBase.cpp.
References clang::ASTMutationListener::DeclarationMarkedUsed(), clang::ASTContext::getASTMutationListener(), isUsed(), and setIsUsed().
Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnGotoStmt(), clang::Sema::BuildBlockForLambdaConversion(), buildDeclRefExpr(), captureInCapturedRegion(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), clang::Sema::GetOrCreateMSAsmLabel(), clang::Sema::MarkFunctionReferenced(), clang::MarkVarDeclODRUsed(), and clang::ASTDeclReader::UpdateDecl().
|
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.
| Size | The size of the allocated object. |
| Ctx | The context in which we will allocate memory. |
| ID | The global ID of the deserialized declaration. |
| Extra | The amount of extra space to allocate after the object. |
Definition at line 53 of file DeclBase.cpp.
References clang::ASTContext::Allocate(), Context, ID, and Result.
|
protected |
Allocate memory for a non-deserialized declaration.
Definition at line 73 of file DeclBase.cpp.
References Buffer.
| void Decl::print | ( | raw_ostream & | Out, |
| unsigned | Indentation = 0, |
||
| bool | PrintInstantiation = false |
||
| ) | const |
Definition at line 111 of file DeclPrinter.cpp.
References getASTContext().
Referenced by clang::LocationContext::dumpStack(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), and print_block().
| void Decl::print | ( | raw_ostream & | Out, |
| const PrintingPolicy & | Policy, | ||
| unsigned | Indentation = 0, |
||
| bool | PrintInstantiation = false |
||
| ) | const |
Definition at line 116 of file DeclPrinter.cpp.
|
static |
Definition at line 156 of file DeclPrinter.cpp.
References Begin, End, clang::PrintingPolicy::IncludeTagDefinition, and clang::PrintingPolicy::SuppressSpecifiers.
|
static |
Definition at line 148 of file DeclBase.cpp.
Referenced by clang::ParseAST().
|
inline |
Returns an iterator range for all the redeclarations of the same decl.
It will iterate at least once (when this decl is the only one).
Definition at line 911 of file DeclBase.h.
Referenced by compareDeclarations(), clang::NamedDecl::declarationReplaces(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), findAcceptableDecl(), findDefiningRedecl(), clang::LinkageComputer::getLVForDecl(), clang::ASTContext::getRawCommentForAnyRedecl(), hasVisibleDeclarationImpl(), and isReferenced().
|
inline |
Definition at line 915 of file DeclBase.h.
|
inline |
Definition at line 918 of file DeclBase.h.
|
inline |
Definition at line 446 of file DeclBase.h.
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::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnVarTemplateSpecialization(), addAsFieldToClosureType(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::buildInitCaptureField(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), captureInCapturedRegion(), captureThis(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckOMPThreadPrivateDecl(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::findInheritingConstructor(), clang::ASTContext::getBlockDescriptorExtendedType(), clang::ASTContext::getBlockDescriptorType(), clang::ASTContext::getCFConstantStringDecl(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::Sema::HandleMSProperty(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), InjectAnonymousStructOrUnionMembers(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::MergeVarDecl(), clang::UnresolvedSetImpl::setAccess(), setInvalidDecl(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::startLambdaDefinition(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclReader::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::ASTNodeImporter::VisitVarTemplateDecl().
|
inline |
Definition at line 463 of file DeclBase.h.
Referenced by clang::Sema::mergeDeclAttributes(), and mergeParamDeclAttributes().
|
inlineprotected |
Definition at line 386 of file DeclBase.h.
Referenced by clang::LinkageComputer::getLVForDecl(), clang::ASTDeclReader::VisitFunctionDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().
| void Decl::setDeclContext | ( | DeclContext * | DC | ) |
setDeclContext - Set both the semantic and lexical DeclContext to DC.
Definition at line 264 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::DeclApplyPragmaWeak(), clang::ParmVarDecl::setOwningFunction(), clang::Sema::SubstParmVarDecl(), and clang::ASTDeclReader::VisitDecl().
Definition at line 538 of file DeclBase.h.
References I.
Referenced by clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartNamespaceDef(), addAsFieldToClosureType(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::BuildAnonymousStructOrUnion(), clang::ASTContext::buildImplicitRecord(), clang::ASTContext::buildImplicitTypedef(), clang::Sema::buildInitCaptureField(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildParmVarDeclForTypedef(), buildVarDecl(), captureInCapturedRegion(), captureThis(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateCapturedStmtRecordDecl(), clang::ImportDecl::CreateImplicit(), clang::CXXRecordDecl::CreateLambda(), createMakeIntegerSeqParameterList(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::findInheritingConstructor(), clang::Sema::getOrCreateStdNamespace(), clang::Sema::ImplicitlyDefineFunction(), clang::ImplicitParamDecl::ImplicitParamDecl(), clang::ASTImporter::Imported(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), InjectAnonymousStructOrUnionMembers(), clang::Sema::LazilyCreateBuiltin(), clang::Sema::MergeFunctionDecl(), clang::UsingShadowDecl::UsingShadowDecl(), clang::ASTDeclReader::VisitDecl(), and clang::ASTNodeImporter::VisitFieldDecl().
setInvalidDecl - Indicates the Decl had a semantic error.
This allows for graceful error recovery.
Definition at line 111 of file DeclBase.cpp.
References clang::AS_public, and setAccess().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnBaseSpecifier(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCapturedRegionError(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnCXXForRangeStmt(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnLambdaError(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnOpenMPDeclareReductionDirectiveEnd(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnParamDefaultArgument(), clang::Sema::ActOnParamDefaultArgumentError(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagDefinitionError(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildCXXDefaultInitExpr(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), checkAttributesAfterMerging(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCoroutineBody(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConstructor(), clang::Sema::checkCUDATargetOverload(), clang::Sema::CheckCXXDefaultArgExpr(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckForFunctionRedefinition(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckInheritingConstructorUsingDecl(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMSVCRTEntryPoint(), checkNewAttributesAfterDef(), clang::Sema::CheckObjCDeclScope(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckParameter(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::checkVarDeclRedefinition(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CheckVarTemplateId(), CreateNewFunctionDecl(), clang::Sema::DeduceVariableDeclarationType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), DiagnoseInvalidRedeclaration(), clang::Sema::DiagnoseUninstantiableTemplate(), diagnoseVarDeclTypeMismatch(), clang::Sema::FinalizeDeclaration(), clang::Sema::findInheritingConstructor(), FinishForRangeVarDecl(), clang::Sema::FinishTemplateArgumentDeduction(), GetFullTypeForDeclarator(), getPatternForClassTemplateSpecialization(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), handleOpenCLAccessAttr(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateInClassInitializer(), clang::Sema::InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::InstantiateVariableInitializer(), clang::Sema::isIncompatibleTypedef(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::ParseTypedefDecl(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::SetCtorInitializers(), clang::Sema::SetDeclDeleted(), clang::Sema::SetParamDefaultArgument(), clang::Sema::SubstBaseSpecifiers(), clang::ASTDeclReader::VisitDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
inline |
Set whether the declaration is used, in the sense of odr-use.
This should only be used immediately after creating a declaration. It intentionally doesn't notify any listeners.
Definition at line 552 of file DeclBase.h.
References getCanonicalDecl().
Referenced by clang::Sema::BuildVariableInstantiation(), clang::ASTImporter::Imported(), markUsed(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::MergeVarDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), and clang::ASTNodeImporter::VisitVarDecl().
| void Decl::setLexicalDeclContext | ( | DeclContext * | DC | ) |
Definition at line 268 of file DeclBase.cpp.
References getASTContext(), getDeclContext(), getLexicalDeclContext(), getModuleOwnershipKind(), getOwningModule(), hasOwningModule(), isFromASTFile(), setLocalOwningModule(), setModuleOwnershipKind(), and VisibleWhenImported.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnProperty(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), clang::ObjCImplDecl::addClassMethod(), clang::ObjCImplDecl::addInstanceMethod(), clang::Sema::BuildLambdaExpr(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckImplementationIvars(), clang::Sema::CheckTemplateIdType(), checkTupleLikeDecomposition(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::startLambdaDefinition(), clang::ASTNodeImporter::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitLinkageSpecDecl(), 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::VisitObjCTypeParamDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitStaticAssertDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
|
inline |
Changes the namespace of this declaration to reflect that it's a function-local extern declaration.
These declarations appear in the lexical context of the extern declaration, but in the semantic context of the enclosing namespace scope.
Definition at line 1004 of file DeclBase.h.
References getIdentifierNamespace().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildVariableInstantiation(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().
|
inline |
Definition at line 724 of file DeclBase.h.
Referenced by clang::Sema::ActOnModuleDecl(), and setLexicalDeclContext().
|
inline |
Definition at line 408 of file DeclBase.h.
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnLabelStmt(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::GetOrCreateMSAsmLabel(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::AccessSpecDecl::setAccessSpecifierLoc(), clang::ASTDeclReader::VisitDecl(), clang::ASTDeclReader::VisitOMPDeclareReductionDecl(), clang::ASTDeclReader::VisitPragmaCommentDecl(), and clang::ASTDeclReader::VisitPragmaDetectMismatchDecl().
|
inline |
Set whether this declaration is hidden from name lookup.
Definition at line 762 of file DeclBase.h.
Referenced by clang::Sema::ActOnStartExportDecl(), clang::Sema::ActOnStartOfTranslationUnit(), setLexicalDeclContext(), and clang::ASTDeclReader::VisitDecl().
|
inlineprotected |
Specify that this declaration was marked as being private to the module in which it was defined.
Definition at line 604 of file DeclBase.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIvar(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckClassTemplate(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), and clang::Sema::ParseTypedefDecl().
|
inline |
Specifies that this declaration is a C++ overloaded non-member.
Definition at line 1079 of file DeclBase.h.
References getKind().
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
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 1031 of file DeclBase.h.
References getIdentifierNamespace().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), clang::Sema::CheckClassTemplate(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
inlineprotected |
Set the owning module ID.
Definition at line 613 of file DeclBase.h.
References ID.
Referenced by clang::ASTDeclReader::VisitDecl().
Definition at line 567 of file DeclBase.h.
Referenced by clang::Sema::BuildBlockForLambdaConversion(), buildDeclRefExpr(), clang::Sema::BuildVariableInstantiation(), captureInCapturedRegion(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), DoMarkVarDeclReferenced(), clang::Sema::MarkAnyDeclReferenced(), clang::Sema::MarkFunctionReferenced(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), and clang::ASTDeclReader::VisitDecl().
Definition at line 576 of file DeclBase.h.
Referenced by clang::Sema::ActOnDeclarator(), clang::Sema::ActOnFinishObjCImplementation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTagFinishDefinition(), and clang::ASTDeclReader::VisitDecl().
|
inline |
Set that this declaration is globally visible, even if it came from a module that is not visible.
Definition at line 751 of file DeclBase.h.
Referenced by clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateVariableDefinition(), clang::Sema::makeMergedDefinitionVisible(), clang::ASTContext::mergeDefinitionIntoModule(), clang::ASTReader::mergeDefinitionVisibility(), and clang::ASTDeclReader::VisitDecl().
|
inline |
Definition at line 510 of file DeclBase.h.
Referenced by clang::Sema::IsOverload().
|
inline |
Definition at line 514 of file DeclBase.h.
Referenced by clang::Sema::IsOverload().
|
inline |
Definition at line 505 of file DeclBase.h.
Referenced by clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), AttrFilter(), clang::Sema::CheckAlignasUnderalignment(), CheckNonNullArguments(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), diagnoseDiagnoseIfAttrsWith(), clang::CodeGen::emitDeclareSimdFunction(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::Sema::FinalizeDeclaration(), getNonNullAttr(), getPrintfFormatArgumentNum(), getVisibilityOf(), handleAnnotateAttr(), handleOwnershipAttr(), hasDependentAlignment(), hasRCAnnotation(), hasSameOverloadableAttrs(), isFunctionAlwaysEnabled(), mergeAlignedAttrs(), clang::Sema::mergeDeclAttributes(), clang::Sema::mergeFormatAttr(), mergeParamDeclAttributes(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr().
|
protected |
Update a potentially out-of-date declaration.
Definition at line 43 of file DeclBase.cpp.
References getASTContext(), clang::ASTContext::getExternalSource(), and clang::ExternalASTSource::updateOutOfDateIdentifier().
Referenced by clang::TagDecl::getDefinition().
|
friend |
Definition at line 317 of file DeclBase.h.
|
friend |
Definition at line 316 of file DeclBase.h.
|
friend |
Definition at line 318 of file DeclBase.h.
|
friend |
Definition at line 304 of file DeclBase.h.
|
friend |
Definition at line 234 of file DeclBase.h.
|
friend |
Definition at line 319 of file DeclBase.h.
|
friend |
Definition at line 321 of file DeclBase.h.
|
protected |
Access - Used by C++ decls for the access specifier.
Definition at line 303 of file DeclBase.h.
|
mutableprotected |
If 0, we have not computed the linkage of this declaration.
Otherwise, it is the linkage + 1.
Definition at line 314 of file DeclBase.h.
|
protected |
Whether this declaration was loaded from an AST file.
Definition at line 307 of file DeclBase.h.
Referenced by clang::ASTDeclReader::VisitDecl().
|
protected |
IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
Definition at line 310 of file DeclBase.h.
|
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 ModuleOwnershipKind.
Definition at line 231 of file DeclBase.h.
Referenced by clang::DeclContext::addHiddenDecl(), clang::DeclContext::BuildDeclChain(), clang::DeclContext::containsDecl(), clang::DeclContext::isDeclInLexicalTraversal(), and clang::DeclContext::removeDecl().
1.8.6