clang 17.0.0git
|
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 , IDNS_OMPMapper = 0x2000 } |
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 class | ModuleOwnershipKind : unsigned { Unowned , Visible , VisibleWhenImported , ReachableWhenImported , ModulePrivate } |
The kind of ownership a declaration has, for visibility purposes. More... | |
enum | FriendObjectKind { FOK_None , FOK_Declared , FOK_Undeclared } |
using | attr_iterator = AttrVec::const_iterator |
using | attr_range = llvm::iterator_range< attr_iterator > |
using | redecl_range = llvm::iterator_range< redecl_iterator > |
Public Member Functions | |
Decl ()=delete | |
Decl (const Decl &)=delete | |
Decl (Decl &&)=delete | |
Decl & | operator= (const Decl &)=delete |
Decl & | operator= (Decl &&)=delete |
virtual SourceRange | getSourceRange () const LLVM_READONLY |
Source range that this declaration covers. | |
SourceLocation | getBeginLoc () const LLVM_READONLY |
SourceLocation | getEndLoc () 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 |
DeclContext * | getNonTransparentDeclContext () |
Return the non transparent context. | |
const DeclContext * | getNonTransparentDeclContext () const |
Decl * | getNonClosureContext () |
Find the innermost non-closure ancestor of this declaration, walking up through blocks, lambdas, etc. | |
const Decl * | getNonClosureContext () const |
TranslationUnitDecl * | getTranslationUnitDecl () |
const TranslationUnitDecl * | getTranslationUnitDecl () const |
bool | isInAnonymousNamespace () const |
bool | isInStdNamespace () const |
bool | isFileContextDecl () const |
ASTContext & | getASTContext () const LLVM_READONLY |
const LangOptions & | getLangOpts () const LLVM_READONLY |
Helper to get the language options from the ASTContext. | |
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. | |
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. | |
void | setInvalidDecl (bool Invalid=true) |
setInvalidDecl - Indicates the Decl had a semantic error. | |
bool | isInvalidDecl () const |
bool | isImplicit () const |
isImplicit - Indicates whether the declaration was implicitly generated by the implementation. | |
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. | |
void | setIsUsed () |
Set whether the declaration is used, in the sense of odr-use. | |
void | markUsed (ASTContext &C) |
Mark the declaration used, in the sense of odr-use. | |
bool | isReferenced () const |
Whether any declaration of this entity was referenced. | |
bool | isThisDeclarationReferenced () const |
Whether this declaration was referenced. | |
void | setReferenced (bool R=true) |
bool | isTopLevelDeclInObjCContainer () const |
Whether this declaration is a top-level declaration (function, global variable, etc.) that is lexically inside an objc container definition. | |
void | setTopLevelDeclInObjCContainer (bool V=true) |
ExternalSourceSymbolAttr * | getExternalSourceSymbolAttr () const |
Looks on this and related declarations for an applicable external source symbol attribute. | |
bool | isModulePrivate () const |
Whether this declaration was marked as being private to the module in which it was defined. | |
bool | isInExportDeclContext () const |
Whether this declaration was exported in a lexical context. | |
bool | isInvisibleOutsideTheOwningModule () const |
bool | isDiscardedInGlobalModuleFragment () const |
FIXME: Implement discarding declarations actually in global module fragment. | |
bool | hasDefiningAttr () const |
Return true if this declaration has an attribute which acts as definition of the entity, such as 'alias' or 'ifunc'. | |
const Attr * | getDefiningAttr () const |
Return this declaration's defining attribute if it has one. | |
void | setFromASTFile () |
Set the FromASTFile flag. | |
void | setOwningModuleID (unsigned ID) |
Set the owning module ID. | |
AvailabilityResult | getAvailability (std::string *Message=nullptr, VersionTuple EnclosingVersion=VersionTuple(), StringRef *RealizedPlatform=nullptr) const |
Determine the availability of the given declaration. | |
VersionTuple | getVersionIntroduced () const |
Retrieve the version of the target platform in which this declaration was introduced. | |
bool | isDeprecated (std::string *Message=nullptr) const |
Determine whether this declaration is marked 'deprecated'. | |
bool | isUnavailable (std::string *Message=nullptr) const |
Determine whether this declaration is marked 'unavailable'. | |
bool | isWeakImported () const |
Determine whether this is a weak-imported symbol. | |
bool | canBeWeakImported (bool &IsDefinition) const |
Determines whether this symbol can be weak-imported, e.g., whether it would be well-formed to add the weak_import attribute. | |
bool | isFromASTFile () const |
Determine whether this declaration came from an AST file (such as a precompiled header or module) rather than having been parsed. | |
unsigned | getGlobalID () const |
Retrieve the global declaration ID associated with this declaration, which specifies where this Decl was loaded from. | |
unsigned | getOwningModuleID () const |
Retrieve the global ID of the module that owns this particular declaration. | |
Module * | getImportedOwningModule () const |
Get the imported owning module, if this decl is from an imported (non-local) module. | |
Module * | getLocalOwningModule () const |
Get the local owning module, if known. | |
void | setLocalOwningModule (Module *M) |
bool | hasOwningModule () const |
Is this declaration owned by some module? | |
Module * | getOwningModule () const |
Get the module that owns this declaration (for visibility purposes). | |
Module * | getOwningModuleForLinkage (bool IgnoreLinkage=false) const |
Get the module that owns this declaration for linkage purposes. | |
bool | isUnconditionallyVisible () const |
Determine whether this declaration is definitely visible to name lookup, independent of whether the owning module is visible. | |
bool | isReachable () const |
void | setVisibleDespiteOwningModule () |
Set that this declaration is globally visible, even if it came from a module that is not visible. | |
ModuleOwnershipKind | getModuleOwnershipKind () const |
Get the kind of module ownership for this declaration. | |
void | setModuleOwnershipKind (ModuleOwnershipKind MOK) |
Set whether this declaration is hidden from name lookup. | |
unsigned | getIdentifierNamespace () const |
bool | isInIdentifierNamespace (unsigned NS) const |
bool | hasTagIdentifierNamespace () const |
DeclContext * | getLexicalDeclContext () |
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC). | |
const DeclContext * | getLexicalDeclContext () const |
virtual bool | isOutOfLine () const |
Determine whether this declaration is declared out of line (outside its semantic context). | |
void | setDeclContext (DeclContext *DC) |
setDeclContext - Set both the semantic and lexical DeclContext to DC. | |
void | setLexicalDeclContext (DeclContext *DC) |
bool | isTemplated () const |
Determine whether this declaration is a templated entity (whether it is. | |
unsigned | getTemplateDepth () const |
Determine the number of levels of template parameter surrounding this declaration. | |
bool | isDefinedOutsideFunctionOrMethod () const |
isDefinedOutsideFunctionOrMethod - This predicate returns true if this scoped decl is defined outside the current function or method. | |
bool | isInLocalScopeForInstantiation () const |
Determine whether a substitution into this declaration would occur as part of a substitution into a dependent local scope. | |
const DeclContext * | getParentFunctionOrMethod (bool LexicalParent=false) const |
If this decl is defined inside a function/method/block it returns the corresponding DeclContext, otherwise it returns null. | |
DeclContext * | getParentFunctionOrMethod (bool LexicalParent=false) |
virtual Decl * | getCanonicalDecl () |
Retrieves the "canonical" declaration of the given declaration. | |
const Decl * | getCanonicalDecl () const |
bool | isCanonicalDecl () const |
Whether this particular Decl is a canonical one. | |
redecl_range | redecls () const |
Returns an iterator range for all the redeclarations of the same decl. | |
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. | |
const Decl * | getPreviousDecl () const |
Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration. | |
bool | isFirstDecl () const |
True if this is the first declaration in its redeclaration chain. | |
Decl * | getMostRecentDecl () |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration). | |
const Decl * | getMostRecentDecl () const |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration). | |
virtual Stmt * | getBody () const |
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. | |
virtual bool | hasBody () const |
Returns true if this Decl represents a declaration for a body of code, such as a function or method definition. | |
SourceLocation | getBodyRBrace () const |
getBodyRBrace - Gets the right brace of the body, if a body exists. | |
bool | isTemplateParameter () const |
isTemplateParameter - Determines whether this declaration is a template parameter. | |
bool | isTemplateParameterPack () const |
isTemplateParameter - Determines whether this declaration is a template parameter pack. | |
bool | isParameterPack () const |
Whether this declaration is a parameter pack. | |
bool | isTemplateDecl () const |
returns true if this declaration is a template | |
bool | isFunctionOrFunctionTemplate () const |
Whether this declaration is a function or function template. | |
TemplateDecl * | getDescribedTemplate () const |
If this is a declaration that describes some template, this method returns that template declaration. | |
const TemplateParameterList * | getDescribedTemplateParams () const |
If this is a declaration that describes some template or partial specialization, this returns the corresponding template parameter list. | |
FunctionDecl * | getAsFunction () LLVM_READONLY |
Returns the function itself, or the templated function if this is a function template. | |
const FunctionDecl * | getAsFunction () const |
void | setLocalExternDecl () |
Changes the namespace of this declaration to reflect that it's a function-local extern declaration. | |
bool | isLocalExternDecl () const |
Determine whether this is a block-scope declaration with linkage. | |
void | setObjectOfFriendDecl (bool PerformFriendInjection=false) |
Changes the namespace of this declaration to reflect that it's the object of a friend declaration. | |
FriendObjectKind | getFriendObjectKind () const |
Determines whether this declaration is the object of a friend declaration and, if so, what kind. | |
void | setNonMemberOperator () |
Specifies that this declaration is a C++ overloaded non-member. | |
void | print (raw_ostream &Out, unsigned Indentation=0, bool PrintInstantiation=false) const |
void | print (raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation=0, bool PrintInstantiation=false) const |
void | dump () const |
void | dumpColor () const |
void | dump (raw_ostream &Out, bool Deserialize=false, ASTDumpOutputFormat OutputFormat=ADOF_Default) const |
int64_t | getID () const |
const FunctionType * | getFunctionType (bool BlocksToo=true) const |
Looks through the Decl's underlying type to extract a FunctionType when possible. | |
bool | isFunctionPointerType () const |
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. | |
void * | operator new (std::size_t Size, const ASTContext &Ctx, DeclContext *Parent, std::size_t Extra=0) |
Allocate memory for a non-deserialized declaration. | |
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. | |
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. | |
bool | hasLocalOwningModuleStorage () const |
virtual Decl * | getNextRedeclarationImpl () |
Returns the next redeclaration or itself if this is the only decl. | |
virtual Decl * | getPreviousDeclImpl () |
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain. | |
virtual Decl * | getMostRecentDeclImpl () |
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain. | |
ASTMutationListener * | getASTMutationListener () const |
Protected Attributes | |
llvm::PointerIntPair< Decl *, 3, ModuleOwnershipKind > | NextInContextAndBits |
The next declaration within the same lexical DeclContext. | |
unsigned | Access: 2 |
Access - Used by C++ decls for the access specifier. | |
unsigned | FromASTFile: 1 |
Whether this declaration was loaded from an AST file. | |
unsigned | IdentifierNamespace: 14 |
IdentifierNamespace - This specifies what IDNS_* namespace this lives in. | |
unsigned | CacheValidAndLinkage: 3 |
If 0, we have not computed the linkage of this declaration. | |
Friends | |
class | DeclContext |
class | ASTDeclReader |
class | ASTDeclWriter |
class | ASTNodeImporter |
class | ASTReader |
class | CXXClassMemberWrapper |
class | LinkageComputer |
class | RecordDecl |
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 83 of file DeclBase.h.
using clang::Decl::attr_iterator = AttrVec::const_iterator |
Definition at line 516 of file DeclBase.h.
using clang::Decl::attr_range = llvm::iterator_range<attr_iterator> |
Definition at line 517 of file DeclBase.h.
using clang::Decl::redecl_range = llvm::iterator_range<redecl_iterator> |
Definition at line 1010 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 1175 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 112 of file DeclBase.h.
enum clang::Decl::Kind |
Lists the kind of concrete classes of Decl.
Definition at line 86 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 213 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 195 of file DeclBase.h.
|
delete |
Referenced by clang::Sema::UnifySection().
|
delete |
|
delete |
|
inlineprotected |
Definition at line 382 of file DeclBase.h.
References add().
|
inlineprotected |
Definition at line 392 of file DeclBase.h.
References add().
|
protectedvirtualdefault |
|
static |
Definition at line 202 of file DeclBase.cpp.
Referenced by Decl().
void Decl::addAttr | ( | Attr * | A | ) |
Definition at line 903 of file DeclBase.cpp.
References getAttrs(), hasAttrs(), clang::Attr::isInherited(), and setAttrs().
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnOpenMPDeclareVariantDirective(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnPragmaRedefineExtname(), clang::Sema::ActOnPragmaUnused(), clang::Sema::ActOnPragmaWeakID(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignmentAttributesForRecord(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAllocAlignAttr(), clang::Sema::addAMDGPUFlatWorkGroupSizeAttr(), clang::Sema::addAMDGPUWavesPerEUAttr(), clang::Sema::AddAnnotationAttr(), clang::Sema::AddAssumeAlignedAttr(), clang::Sema::AddCFAuditedAttribute(), clang::Sema::AddImplicitMSFunctionNoBuiltinAttr(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), clang::Sema::AddLaunchBoundsAttr(), clang::Sema::AddModeAttr(), clang::Sema::AddMsStructLayoutForRecord(), clang::Sema::AddOptnoneAttributeIfNoConflicts(), clang::Sema::AddParameterABIAttr(), AddPropertyAttrs(), clang::Sema::AddPushedVisibilityAttribute(), clang::Sema::AddSectionMSAllocText(), applyOMPAllocateAttribute(), assignInheritanceModel(), clang::ASTContext::buildImplicitRecord(), buildVarDecl(), clang::Sema::CheckARCMethodDecl(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkDLLAttributeRedeclaration(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::checkInitMethod(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionFunction(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::CheckStaticLocalForDllExport(), copyAttrFromTypedefToDecl(), copyAttrIfPresent(), clang::Sema::CreateBuiltin(), createPrivatesRecordDecl(), clang::Sema::CUDASetLambdaAttrs(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::FinalizeDeclaration(), handleAbiTagAttr(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAcquireHandleAttr(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleAnalyzerNoReturnAttr(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleArmBuiltinAliasAttr(), handleARMInterruptAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAssumumptionAttr(), handleAttrWithMessage(), handleAvailabilityAttr(), handleBlocksAttr(), handleBTFDeclTagAttr(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCapabilityAttr(), handleCFGuardAttr(), handleCleanupAttr(), handleCmseNSEntryAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCPUSpecificAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), handleErrorAttr(), handleExclusiveTrylockFunctionAttr(), handleExternalSourceSymbolAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionReturnThunksAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHandleAttr(), handleHLSLNumThreadsAttr(), handleHLSLResourceBindingAttr(), handleHLSLShaderAttr(), handleHLSLSV_DispatchThreadIDAttr(), handleHLSLSVGroupIndexAttr(), handleIBOutlet(), handleIBOutletCollection(), handleIFuncAttr(), handleInitPriorityAttr(), handleInternalLinkageAttr(), handleLayoutVersion(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleM68kInterruptAttr(), handleManagedAttr(), handleMinSizeAttr(), handleMinVectorWidthAttr(), handleMipsInterruptAttr(), handleMSInheritanceAttr(), handleMSP430InterruptAttr(), handleNakedAttr(), handleNoBuiltinAttr(), handleNoDebugAttr(), handleNoEscapeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoRandomizeLayoutAttr(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNSErrorDomain(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOpenCLAccessAttr(), handleOptimizeNoneAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handlePreferredName(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleRandomizeLayoutAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleRISCVInterruptAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleSharedTrylockFunctionAttr(), handleSimpleAttribute(), handleStandardNoReturnAttr(), handleSubGroupSize(), handleSuppressAttr(), handleSwiftAsyncAttr(), handleSwiftAsyncError(), handleSwiftAsyncName(), handleSwiftAttrAttr(), handleSwiftBridge(), handleSwiftError(), handleSwiftName(), handleSwiftNewType(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnsafeBufferUsage(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWebAssemblyExportNameAttr(), handleWebAssemblyImportModuleAttr(), handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), handleXRayLogArgsAttr(), handleZeroCallUsedRegsAttr(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), InjectAnonymousStructOrUnionMembers(), InsertOCLBuiltinDeclarationsFromTable(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateAttrsForDecl(), instantiateDependentDiagnoseIfAttr(), instantiateDependentEnableIfAttr(), instantiateDependentSYCLKernelAttr(), clang::Sema::makeUnavailableInSystemHeader(), clang::Sema::MaybeAddCUDAConstantAttr(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), mergeAlignedAttrs(), mergeDeclAttribute(), clang::Sema::mergeDeclAttributes(), clang::Sema::MergeFunctionDecl(), clang::ASTDeclReader::mergeInheritableAttributes(), mergeInterfaceMethodToImpl(), mergeObjCDirectMembers(), mergeParamDeclAttributes(), clang::Sema::ProcessPropertyDecl(), clang::Sema::propagateDLLAttrToBaseClassTemplate(), clang::RecordDecl::setCapturedRecord(), clang::Sema::updateAttrsForLateParsedTemplate(), and clang::ASTDeclReader::UpdateDecl().
|
inline |
Definition at line 523 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by attrs(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), and specific_attr_begin().
|
inline |
Definition at line 526 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by attrs(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), and specific_attr_end().
|
inline |
Definition at line 519 of file DeclBase.h.
References attr_begin(), and attr_end().
Referenced by checkNonMultiVersionCompatAttributes(), clang::Sema::checkThisInStaticMemberFunctionAttributes(), DeclHasAttr(), clang::tooling::getAssociatedRange(), getAttrForPlatform(), getAvailability(), getVersionIntroduced(), hasAttribute(), InjectAnonymousStructOrUnionMembers(), clang::threadSafety::BeforeSet::insertAttrExprs(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateAttrsForDecl(), isWeakImported(), clang::Sema::updateAttrsForLateParsedTemplate(), and clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
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 702 of file DeclBase.cpp.
References getASTContext(), getLangOpts(), and clang::ObjCRuntime::hasWeakClassImport().
Referenced by handleWeakImportAttr(), and isWeakImported().
|
static |
Definition at line 931 of file DeclBase.cpp.
References clang::DeclContext::getDeclKind().
Referenced by clang::Sema::ActOnIfStmt(), clang::ast_matchers::AST_MATCHER_P(), clang::PredefinedExpr::ComputeName(), and clang::cast_convert_decl_context< ToTy, IsKnownSubtype >::doit().
|
static |
Definition at line 950 of file DeclBase.cpp.
References getKind().
Referenced by clang::Sema::CheckTemplateArgumentList().
Definition at line 1201 of file DeclBase.h.
|
inline |
Definition at line 531 of file DeclBase.h.
References getAttrs().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnStartOfFunctionDef(), checkAttributesAfterMerging(), clang::Sema::CheckCompleteVariableDeclaration(), checkDLLAttributeRedeclaration(), clang::Sema::checkIllFormedTrivialABIStruct(), clang::Sema::CheckOverrideControl(), clang::Sema::FinalizeDeclaration(), handleCodeSegAttr(), handleConstantAttr(), handleDeviceAttr(), handleEnforceTCBAttr(), handleFunctionReturnThunksAttr(), handleNoBuiltinAttr(), handleZeroCallUsedRegsAttr(), clang::Sema::mergeDLLExportAttr(), mergeEnforceTCBAttrImpl(), clang::Sema::mergeErrorAttr(), clang::Sema::MergeFunctionDecl(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeOptimizeNoneAttr(), clang::Sema::mergeSwiftNameAttr(), clang::Sema::mergeUuidAttr(), clang::Sema::MergeVarDecl(), mergeVisibilityAttr(), clang::Sema::ProcessDeclAttributeList(), and StripImplicitInstantiation().
void Decl::dropAttrs | ( | ) |
Definition at line 896 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 206 of file ASTDumper.cpp.
References dump().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::LookupResult::dump(), clang::AnyCall::dump(), and dump().
LLVM_DUMP_METHOD void Decl::dump | ( | raw_ostream & | Out, |
bool | Deserialize = false , |
||
ASTDumpOutputFormat | OutputFormat = ADOF_Default |
||
) | const |
Definition at line 208 of file ASTDumper.cpp.
References clang::ADOF_JSON, getASTContext(), clang::ASTContext::getCommentCommandTraits(), clang::ASTContext::getDiagnostics(), clang::ASTContext::getPrintingPolicy(), clang::DiagnosticsEngine::getShowColors(), clang::ASTContext::getSourceManager(), OS, P, and SM.
LLVM_DUMP_METHOD void Decl::dumpColor | ( | ) | const |
Definition at line 225 of file ASTDumper.cpp.
References getASTContext(), and P.
|
static |
Definition at line 174 of file DeclBase.cpp.
Referenced by clang::ParseAST().
|
inline |
Definition at line 491 of file DeclBase.h.
References Access.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), clang::LookupResult::addDecl(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildCXXMemberCallExpr(), clang::Sema::BuildUsingPackDecl(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckFriendAccess(), clang::MemberExpr::Create(), clang::MemberExpr::CreateImplicit(), DiagnoseAccessPath(), diagnoseBadDirectAccess(), EvaluateComparisonBinaryOperator(), clang::Sema::findInheritingConstructor(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::getConstructorInfo(), hasUnguardedAccess(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), IsAccessible(), IsMicrosoftUsingDeclarationAccessBug(), clang::Sema::isOpenMPCapturedDecl(), IsStructurallyEquivalent(), clang::Sema::MergeVarDecl(), processImplicitMapsWithDefaultMappers(), clang::Sema::ProduceCallSignatureHelp(), clang::Sema::SetMemberAccessSpecifier(), clang::TemplateDeclInstantiator::SubstDefaultedFunction(), clang::transformOMPMappableExprListClause(), clang::ASTNodeImporter::VisitAccessSpecDecl(), clang::JSONNodeDumper::VisitAccessSpecDecl(), clang::TextNodeDumper::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionTemplateDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypeAliasTemplateDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitUnresolvedUsingTypenameDecl(), clang::ASTNodeImporter::VisitUnresolvedUsingValueDecl(), clang::ASTNodeImporter::VisitUsingShadowDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTDeclWriter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
|
inline |
Retrieve the access specifier for this declaration, even though it may not yet have been properly set.
Definition at line 498 of file DeclBase.h.
References Access.
|
inline |
Definition at line 1106 of file DeclBase.h.
References getAsFunction().
FunctionDecl * Decl::getAsFunction | ( | ) |
Returns the function itself, or the templated function if this is a function template.
Definition at line 227 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnReenterFunctionContext(), clang::Sema::ActOnSkippedFunctionBody(), AddResultTypeChunk(), clang::Sema::canSkipFunctionBody(), clang::Sema::checkCUDATargetOverload(), CheckFallThroughForBody(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionFunction(), clang::Sema::CheckOverload(), clang::Sema::DiagnoseUnguardedAvailabilityViolations(), clang::Sema::FindAssociatedClassesAndNamespaces(), clang::ASTContext::forEachMultiversionedFunctionVersion(), getAsFunction(), GetConversionType(), clang::getDeclUsageType(), clang::CallGraphNode::getDefinition(), clang::ASTContext::getFunctionFeatureMap(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), getPrintfFormatArgumentNum(), handleCallbackAttr(), clang::ADLResult::insert(), clang::NamedDecl::isCXXInstanceMember(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), clang::Sema::MergeFunctionDecl(), noteOverloads(), PreviousDeclsHaveMultiVersionAttribute(), clang::ProgramPoint::printJson(), shouldAddReversedEqEq(), and TryDiagnoseProtectedAccess().
ASTContext & Decl::getASTContext | ( | ) | const |
Definition at line 428 of file DeclBase.cpp.
References clang::TranslationUnitDecl::getASTContext(), and getTranslationUnitDecl().
Referenced by clang::DeclContext::addHiddenDecl(), clang::StoredDeclsList::addOrReplaceDecl(), clang::CXXMethodDecl::addOverriddenMethod(), clang::CodeGen::CodeGenTypes::addRecordTypeName(), annotateConsumedSummaryMismatch(), clang::CXXMethodDecl::begin_overridden_methods(), canBeWeakImported(), clang::VarDecl::checkForConstantInitialization(), clang::checkUnsafeBufferUsage(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::RecordDecl::completeDefinition(), clang::ExternalASTMerger::CompleteType(), clang::LinkageComputer::computeLVForDecl(), clang::PredefinedExpr::ComputeName(), clang::ObjCObjectType::computeSuperClassTypeSlow(), clang::CXXRecordDecl::conversion_begin(), clang::CXXRecordDecl::conversion_end(), clang::LifetimeExtendedTemporaryDecl::Create(), clang::NamedDecl::declarationReplaces(), clang::Sema::DeclClonePragmaWeak(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), dropAttrs(), dump(), dumpColor(), clang::ento::SymbolConjured::dumpToStream(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::CXXMethodDecl::end_overridden_methods(), clang::VarDecl::ensureEvaluatedStmt(), evaluateCDTSize(), findGadgets(), clang::ExternalASTMerger::FindOriginalDecl(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::RedeclarableTemplateDecl::findSpecializationImpl(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), formatBlockPlaceholder(), FormatFunctionParameter(), generateDiagnosticsForCallLike(), clang::index::generateUSRForDecl(), clang::ASTNameGenerator::Implementation::getAllManglings(), clang::MSGuidDecl::getAsAPValue(), clang::tooling::getAssociatedRange(), clang::StoredDeclsList::getASTContext(), 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::RedeclarableTemplateDecl::getCommonPtr(), clang::dataflow::DataflowAnalysisContext::getControlFlowContext(), clang::LinkageComputer::getDeclLinkageAndVisibility(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::getDeviceLambdaManglingNumber(), getEnclosingStmtLocation(), DerefSimplePtrArithFixableGadget::getFixits(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForEnum(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForFunction(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForObjCMethod(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForTypedef(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForVar(), clang::AnalysisDeclContext::getFunctionName(), getID(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCCategoryDecl::getImplementation(), clang::CXXRecordDecl::getIndirectPrimaryBases(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::RedeclarableTemplateDecl::getInjectedTemplateArgs(), getLambdaCallOperatorHelper(), getLambdaStaticInvokers(), getLangOpts(), clang::LinkageComputer::getLVForDecl(), getMaxAlignment(), clang::VarDecl::getMemberSpecializationInfo(), clang::FunctionDecl::getMinRequiredArguments(), clang::CXXRecordDecl::getMSVtorDispMode(), getNDSWDS(), clang::tooling::getOccurrencesOfUSRs(), clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), clang::OMPDeclareReductionDecl::getPrevDeclInScope(), clang::OMPDeclareMapperDecl::getPrevDeclInScope(), clang::getPrimaryMergedDecl(), clang::NamedDecl::getQualifiedNameAsString(), clang::FunctionDecl::getReturnTypeSourceRange(), getSelfInitExpr(), clang::ObjCMethodDecl::getSendResultType(), clang::ObjCObjectPointerType::getSuperClassType(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::CXXMethodDecl::getThisObjectType(), clang::CXXMethodDecl::getThisType(), clang::VarDecl::getTLSKind(), clang::AnalysisDeclContext::getUnoptimizedCFG(), clang::EnumDecl::getValueRange(), getVersionIntroduced(), clang::CXXRecordDecl::getVisibleConversionFunctions(), clang::VarDecl::hasConstantInitialization(), clang::VarDecl::hasDefinition(), hasLocalOwningModuleStorage(), hasSameOverloadableAttrs(), clang::Sema::hasStructuralCompatLayout(), clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue(), implicitObjectParamIsLifetimeBound(), clang::CXXConstructorDecl::init_begin(), clang::ObjCImplementationDecl::init_begin(), clang::ento::CheckerContext::isCLibraryFunction(), isConsumerInterestedIn(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::ParmVarDecl::isDestroyedInCallee(), clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCPropertyDecl::isDirectProperty(), isExactClass(), isGRealloc(), isImportedDeclContext(), clang::Type::isIncompleteType(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::VarDecl::isKnownToBeDefined(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionDecl::isMSExternInline(), clang::Expr::isPotentialConstantExpr(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), isStandardNewDelete(), isStandardRealloc(), IsStructurallyEquivalent(), isSubclass(), clang::VarDecl::isThisDeclarationADefinition(), clang::CXXMethodDecl::isUsualDeallocationFunction(), isWeakImported(), isZeroSized(), clang::CXXRecordDecl::lambdaIsDefaultConstructibleAndAssignable(), clang::RedeclarableTemplateDecl::loadLazySpecializationsImpl(), clang::CXXRecordDecl::lookupInBases(), clang::RecordDecl::mayInsertExtraPadding(), clang::CXXMethodDecl::overridden_methods(), clang::StoredDeclsList::prependDeclNoReplace(), print(), clang::TemplateParamObjectDecl::printAsExpr(), clang::TemplateParamObjectDecl::printAsInit(), clang::NamedDecl::printName(), clang::TagDecl::printName(), clang::NamedDecl::printNestedNameSpecifier(), clang::NamedDecl::printQualifiedName(), clang::ClassTemplateSpecializationDecl::Profile(), clang::ClassTemplatePartialSpecializationDecl::Profile(), clang::VarTemplateSpecializationDecl::Profile(), clang::VarTemplatePartialSpecializationDecl::Profile(), clang::CXXRecordDecl::removeConversion(), saveHash(), clang::ObjCMethodDecl::setAsRedeclaration(), setAttrs(), clang::CXXRecordDecl::setBases(), clang::FieldDecl::setBitWidth(), clang::RecordDecl::setCapturedRecord(), clang::ObjCImplDecl::setClassInterface(), clang::DeclRefExpr::setDecl(), clang::VarDecl::setDescribedVarTemplate(), clang::CXXRecordDecl::setDeviceLambdaManglingNumber(), clang::ObjCInterfaceDecl::setExternallyCompleted(), clang::ClassTemplateSpecializationDecl::setExternLoc(), clang::VarTemplateSpecializationDecl::setExternLoc(), clang::FunctionDecl::setFunctionTemplateSpecialization(), clang::ObjCCategoryDecl::setImplementation(), clang::ObjCInterfaceDecl::setImplementation(), clang::VarDecl::setInit(), clang::ClassTemplateSpecializationDecl::setInstantiationOf(), clang::VarTemplateSpecializationDecl::setInstantiationOf(), clang::CXXRecordDecl::setInstantiationOfMemberClass(), clang::EnumDecl::setInstantiationOfMemberEnum(), clang::FunctionDecl::setInstantiationOfMemberFunction(), clang::VarDecl::setInstantiationOfStaticDataMember(), setLexicalDeclContext(), clang::TypedefNameDecl::setModedTypeSourceInfo(), clang::LabelDecl::setMSAsmLabel(), clang::FunctionDecl::setParams(), clang::BlockDecl::setParams(), clang::DeclaratorDecl::setQualifierInfo(), clang::TagDecl::setQualifierInfo(), clang::VarTemplateSpecializationDecl::setTemplateArgsInfo(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::VarTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::TagDecl::setTemplateParameterListsInfo(), clang::VarDecl::setTemplateSpecializationKind(), clang::FunctionDecl::setTemplateSpecializationKind(), clang::DeclaratorDecl::setTrailingRequiresClause(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::VarTemplateSpecializationDecl::setTypeAsWritten(), shouldOmitDefinition(), shouldRunOnFunctionOrMethod(), clang::CXXMethodDecl::size_overridden_methods(), clang::TagDecl::startDefinition(), updateOutOfDate(), useInlineVisibilityHidden(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit(), clang::TextNodeDumper::Visit(), clang::TextNodeDumper::VisitImportDecl(), clang::ASTDeclReader::VisitLifetimeExtendedTemporaryDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::TextNodeDumper::VisitUnresolvedUsingTypenameDecl(), clang::TextNodeDumper::VisitUnresolvedUsingValueDecl(), clang::TextNodeDumper::VisitUsingDecl(), clang::JSONNodeDumper::VisitUsingDecl(), clang::TextNodeDumper::VisitVarDecl(), clang::extractapi::ExtractAPIVisitor::VisitVarDecl(), and WarnUndefinedMethod().
|
protected |
Definition at line 438 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getASTMutationListener().
Referenced by clang::ClassTemplateDecl::AddPartialSpecialization(), clang::VarTemplateDecl::AddPartialSpecialization(), clang::RedeclarableTemplateDecl::addSpecializationImpl(), clang::TagDecl::completeDefinition(), clang::CXXDestructorDecl::setOperatorDelete(), clang::VarDecl::setTemplateSpecializationKind(), and clang::FunctionDecl::setTemplateSpecializationKind().
|
inline |
Definition at line 556 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddParameterABIAttr(), clang::CodeGen::CGHLSLRuntime::annotateHLSLResource(), checkAttributesAfterMerging(), checkAttrMutualExclusion(), clang::Sema::CheckBaseSpecifier(), clang::consumed::ConsumedStmtVisitor::checkCallability(), clang::Sema::CheckCompleteVariableDeclaration(), checkDLLAttributeRedeclaration(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), clang::Sema::checkIllFormedTrivialABIStruct(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionFirstFunction(), CheckMultiVersionFunction(), CheckMultiVersionValue(), CheckNakedParmReference(), clang::Sema::CheckObjCMethodDirectOverrides(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionAttributes(), checkPreviousOMPAllocateAttribute(), clang::Sema::CheckStaticLocalForDllExport(), CheckTargetCausesMultiVersioning(), checkUndefinedButUsed(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), copyAttrFromTypedefToDecl(), copyAttrIfPresent(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseUnusedExprResult(), DiagnoseUnusedOfDecl(), DoEmitAvailabilityWarning(), EmitGlobalNamedRegister(), emitReadOnlyPlacementAttrWarning(), clang::Sema::FinalizeDeclaration(), clang::index::generateUSRForDecl(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), getCallingConventionForDecl(), clang::getDLLAttr(), GetFullTypeForDeclarator(), clang::ASTContext::getFunctionFeatureMap(), GetMatchingCType(), getNonNullAttr(), clang::CodeGen::CodeGenModule::getOMPAllocateAlignment(), getOpenCLArgAccess(), clang::index::getSymbolInfo(), clang::CallExpr::getUnusedResultAttr(), getVisibilityOf(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::consumed::ConsumedStmtVisitor::handleCall(), handleCodeSegAttr(), handleConstantAttr(), handleCPUSpecificAttr(), handleDeviceAttr(), handleLifetimeCategoryAttr(), handleMinVectorWidthAttr(), handleNoBuiltinAttr(), handleOpenCLAccessAttr(), handleRISCVInterruptAttr(), handleSubGroupSize(), handleSwiftAsyncAttr(), handleSwiftAsyncError(), handleSwiftBridge(), handleTargetClonesAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleWorkGroupSize(), clang::CodeGen::CGOpenMPRuntime::hasAllocateAttributeForGlobalVar(), clang::CodeGen::CGOpenMPRuntimeGPU::hasAllocateAttributeForGlobalVar(), hasExplicitAttr(), hasIdenticalPassObjectSizeAttrs(), hasImplicitAttr(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::Sema::InstantiateDefaultCtorDefaultArgs(), isAllocatableDecl(), isBetterMultiversionCandidate(), clang::Sema::isCFError(), isGeneratedDecl(), clang::MangleContext::mangleName(), mapConsumableAttrState(), MaybeAddSentinel(), clang::ASTContext::mayExternalize(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeCodeSegAttr(), clang::Sema::mergeDeclAttributes(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeErrorAttr(), clang::Sema::MergeFunctionDecl(), clang::Sema::mergeHLSLNumThreadsAttr(), clang::Sema::mergeHLSLShaderAttr(), clang::Sema::mergeImportModuleAttr(), clang::Sema::mergeImportNameAttr(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), clang::Sema::mergeSectionAttr(), clang::Sema::mergeSwiftNameAttr(), clang::Sema::mergeUuidAttr(), clang::Sema::MergeVarDecl(), mergeVisibilityAttr(), clang::Sema::NoteOverloadCandidate(), noteOverloads(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), recordUsesEBO(), clang::CodeGen::CGHLSLRuntime::setHLSLEntryAttributes(), clang::CodeGen::CodeGenModule::setTLSMode(), testsFor(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), clang::Sema::UnifySection(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
|
inline |
Definition at line 508 of file DeclBase.h.
References getAttrs().
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), addAttr(), attr_begin(), attr_end(), AttributesMatch(), clang::Sema::BuildReturnStmt(), checkNewAttributesAfterDef(), createPrivatesRecordDecl(), dropAttr(), clang::Sema::EndOpenMPDSABlock(), getAttr(), getAttrs(), getMaxAlignment(), hasAttr(), hasAttr(), clang::Sema::mergeAvailabilityAttr(), RedeclarePropertyAccessor(), and clang::ASTDeclWriter::VisitDecl().
const AttrVec & Decl::getAttrs | ( | ) | const |
Definition at line 926 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getDeclAttrs().
AvailabilityResult Decl::getAvailability | ( | std::string * | Message = nullptr , |
VersionTuple | EnclosingVersion = VersionTuple() , |
||
StringRef * | RealizedPlatform = nullptr |
||
) | 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. |
RealizedPlatform | If non-NULL and the availability result is found in an available attribute it will set to the platform which is written in the available attribute. |
Definition at line 636 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(), isDeprecated(), isUnavailable(), ShouldDiagnoseAvailabilityOfDecl(), and WarnUndefinedMethod().
|
inline |
Definition at line 424 of file DeclBase.h.
References clang::SourceRange::getBegin(), and getSourceRange().
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnPropertyImplDecl(), clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), clang::interp::ByteCodeEmitter::bail(), clang::interp::EvalEmitter::bail(), clang::Sema::CheckObjCBridgeRelatedConversions(), CheckUnreachable(), clang::ento::PathDiagnosticLocation::createBegin(), clang::ODRDiagsEmitter::diagnoseMismatch(), clang::Sema::diagnoseNullResettableSynthesizedSetters(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), GenerateFixForUnusedDecl(), getDeclLocForCommentSearch(), handleAnyX86InterruptAttr(), handleMIGServerRoutineAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCExternallyRetainedAttr(), handleObjCOwnershipAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handlePassObjectSizeAttr(), handleSimpleAttributeOrDiagnose(), handleXReturnsXRetainedAttr(), clang::syntax::TreeBuilder::isResponsibleForCreatingDeclaration(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), MatchTemplateParameterKind(), clang::InitializationSequence::Perform(), clang::Sema::PrintPragmaAttributeInstantiationPoint(), RedeclarePropertyAccessor(), clang::LexicallyOrderedRecursiveASTVisitor< Derived >::TraverseDeclContextHelper(), clang::ASTNodeImporter::VisitLabelDecl(), clang::ASTDeclWriter::VisitLabelDecl(), clang::ASTDeclWriter::VisitOMPDeclareReductionDecl(), clang::ASTDeclWriter::VisitPragmaCommentDecl(), and clang::ASTDeclWriter::VisitPragmaDetectMismatchDecl().
|
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::FunctionDecl, clang::BlockDecl, clang::CapturedDecl, and clang::ObjCMethodDecl.
Definition at line 1052 of file DeclBase.h.
Referenced by clang::CloneDetector::analyzeCodeBody(), CheckStringRefAssignedTemporary(), clang::checkUnsafeBufferUsage(), clang::ento::PathDiagnosticLocation::createDeclBegin(), emitDiagnostics(), findGadgets(), getBodyRBrace(), clang::ento::getWidenedLoopState(), hasBody(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), and populateExecutedLinesWithFunctionSignature().
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 969 of file DeclBase.cpp.
References clang::Definition, and getBody().
Referenced by clang::ento::PathDiagnosticLocation::createDeclEnd().
|
inlineprotected |
Definition at line 406 of file DeclBase.h.
References CacheValidAndLinkage.
Referenced by clang::LinkageComputer::getLVForDecl(), and clang::NamedDecl::isLinkageValid().
|
inlinevirtual |
Retrieves the "canonical" declaration of the given declaration.
Reimplemented in clang::NamespaceDecl, clang::VarDecl, clang::FunctionDecl, clang::FieldDecl, clang::EnumConstantDecl, clang::IndirectFieldDecl, clang::TypedefNameDecl, clang::TagDecl, clang::EnumDecl, clang::CXXRecordDecl, clang::CXXMethodDecl, clang::CXXConstructorDecl, clang::CXXDestructorDecl, clang::CXXConversionDecl, clang::NamespaceAliasDecl, clang::UsingShadowDecl, clang::UsingDecl, clang::UsingEnumDecl, clang::UsingPackDecl, clang::UnresolvedUsingValueDecl, clang::UnresolvedUsingTypenameDecl, clang::ObjCMethodDecl, clang::ObjCInterfaceDecl, clang::ObjCIvarDecl, clang::ObjCProtocolDecl, clang::RedeclarableTemplateDecl, clang::FunctionTemplateDecl, clang::ClassTemplateDecl, clang::TypeAliasTemplateDecl, clang::VarTemplateDecl, clang::ConceptDecl, and clang::TemplateParamObjectDecl.
Definition at line 943 of file DeclBase.h.
Referenced by clang::Sema::ActOnOpenMPLoopInitialization(), clang::Sema::ActOnPragmaMSAllocText(), clang::ODRHash::AddDecl(), clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), AddTemplateParameterChunks(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::ASTContext::cacheRawCommentForDecl(), CheckIdentityFieldAssignment(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), compareDeclarations(), clang::NamedDecl::declarationReplaces(), clang::Sema::DeclareImplicitDeductionGuides(), clang::declaresSameEntity(), DeduceNonTypeTemplateArgument(), clang::ASTContext::deduplicateMergedDefinitonsFor(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSelfMove(), clang::Sema::DiagnoseUseOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), clang::CodeGen::CGDebugInfo::emitFunctionStart(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::ADLResult::erase(), clang::ASTReader::forEachImportedKeyDecl(), clang::index::generateUSRForDecl(), getCanonicalDecl(), getCanonicalDecl(), getCanonicalParmVarDecl(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTContext::getCanonicalTemplateName(), clang::ASTContext::getCommentForDecl(), clang::DeclarationNameTable::getCXXDeductionGuideName(), clang::ObjCInterfaceType::getDecl(), getDeclForLocalLookup(), clang::ASTReader::GetExistingDecl(), clang::ASTWriter::getFirstLocalDecl(), clang::NamedDecl::getFormalLinkage(), getFriendCountAndPosition(), clang::ASTReader::getKeyDeclaration(), clang::ASTContext::getModulesWithMergedDefinition(), clang::CallGraph::getOrInsertNode(), clang::ASTContext::getRawCommentForAnyRedecl(), clang::ASTContext::getSubstTemplateTypeParmPackType(), clang::VTableContextBase::getThunkInfo(), clang::ASTContext::getUnresolvedUsingType(), handleLifetimeCategoryAttr(), hasRecursiveCallInPath(), clang::ASTNodeImporter::ImportAPValue(), clang::ADLResult::insert(), isCanonicalDecl(), clang::ento::isCapturedByReference(), IsEquivalentForUsingDecl(), clang::OverloadCandidateSet::isNewCandidate(), clang::Sema::isOpenMPCapturedByRef(), clang::Sema::isOpenMPDeclareMapperVarDeclAllowed(), clang::Sema::isOpenMPPrivateDecl(), clang::ento::isPossiblyEscaped(), isSameDeclaration(), isSameTemplate(), IsStructurallyEquivalent(), isUsed(), clang::Sema::LookupQualifiedName(), clang::Sema::LookupTemplateName(), MatchesFriend(), clang::ASTContext::mergeDefinitionIntoModule(), clang::Sema::PushSatisfactionStackEntry(), clang::ASTDeclWriter::RegisterTemplateSpecialization(), clang::LookupResult::resolveKind(), clang::Sema::SatisfactionStackContains(), setIsUsed(), shouldBeHidden(), clang::Sema::tryCaptureVariable(), clang::ASTDeclReader::UpdateDecl(), clang::ASTDeclReader::Visit(), clang::ASTDeclReader::VisitMSGuidDecl(), clang::ASTDeclReader::VisitUnnamedGlobalConstantDecl(), and wasDifferentDeclUsedForInlining().
|
inline |
Definition at line 944 of file DeclBase.h.
References getCanonicalDecl().
|
inline |
Definition at line 441 of file DeclBase.h.
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnDeclarator(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFinishObjCImplementation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnReenterTemplateScope(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::ActOnVariableDeclarator(), clang::ASTImporterLookupTable::add(), addAssociatedClassesAndNamespaces(), clang::TypoCorrectionConsumer::addCorrection(), clang::Sema::AddFunctionCandidates(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddMethodCandidate(), clang::Sema::addMethodToGlobalList(), clang::CodeGen::CodeGenTypes::addRecordTypeName(), addRedeclaredMethods(), AddTopLevelDeclarationToHash(), adjustCVQualifiersForCXXThisWithinLambda(), adjustDeclContextForDeclaratorDecl(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXConstructExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVarTemplateInstantiation(), canEmitSpuriousReferenceToVariable(), canonicalizeImmediatelyDeclaredConstraint(), clang::Sema::CheckAddressOfOperand(), checkAtomicPropertyMismatch(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConceptTemplateId(), clang::Sema::CheckCXXDefaultArgExpr(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), CheckExplicitInstantiationScope(), clang::Sema::CheckExplicitlyDefaultedFunction(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::checkInitMethod(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckMessageArgumentTypes(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckMultiVersionFunction(), clang::Sema::CheckObjCMethodDirectOverrides(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCMethodOverrides(), checkObjCUnusedIvar(), CheckOperatorNewDeleteDeclarationScope(), clang::Sema::CheckShadow(), clang::Sema::CheckShadowingDeclModification(), CheckSimplerImplicitMovesMSVCWorkaround(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), checkTupleLikeDecomposition(), checkTypeParamListConsistency(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::checkVarDeclRedefinition(), clang::Sema::CheckVarTemplateId(), collectOverriddenMethodsSlow(), collectViableConversionCandidates(), compareOverloads(), clang::ASTReader::CompleteRedeclChain(), computeCachedProperties(), clang::computeDependence(), clang::LinkageComputer::computeLVForDecl(), clang::PredefinedExpr::ComputeName(), ConvertDeducedTemplateArguments(), clang::LifetimeExtendedTemporaryDecl::Create(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), createFriendTagNNSFixIt(), clang::TypeName::createNestedNameSpecifierForScopeOf(), clang::TypeName::createOuterNNS(), clang::NamedDecl::declarationReplaces(), clang::Sema::DeclareImplicitDeductionGuides(), clang::Sema::DeclClonePragmaWeak(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::DefaultSynthesizeProperties(), clang::ObjCMethodDecl::definedInNSObject(), diagnoseBadDirectAccess(), clang::Sema::DiagnoseDependentMemberLookup(), clang::Sema::DiagnoseEmptyLookup(), diagnoseInstanceReference(), DiagnoseInvalidRedeclaration(), diagnoseNoescape(), diagnoseOpenCLTypes(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnosePropertyMismatch(), clang::Sema::DiagnoseShadowingLambdaDecls(), diagnoseUncapturableValueReferenceOrBinding(), clang::Sema::DiagnoseUninstantiableTemplate(), clang::Sema::DiagnoseUseOfDecl(), DoMarkPotentialCapture(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), emitPrivatesInit(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), clang::CodeGen::CGDebugInfo::EmitUsingShadowDecl(), evaluateVarDeclInit(), FilterMethodsByTypeBound(), clang::Sema::FinalizeDeclaration(), findBackingIvar(), FindConversionForRefInit(), FindDeclaringClass(), findExplicitInstancetypeDeclarer(), clang::Sema::FindInstantiatedDecl(), clang::LocalInstantiationScope::findInstantiationOf(), findMetaClassAlloc(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), clang::Sema::FixOverloadedFunctionReference(), clang::ASTContext::forEachMultiversionedFunctionVersion(), FormatFunctionParameter(), getAsDeclContextOrEnclosing(), getAssignmentAction(), clang::BodyFarm::getBody(), clang::ObjCMethodDecl::getCanonicalDecl(), clang::ObjCMethodDecl::getCategory(), getCategoryContext(), clang::ObjCMethodDecl::getClassInterface(), clang::ConstructorUsingShadowDecl::getConstructedBaseClass(), clang::ObjCIvarDecl::getContainingInterface(), getContextForScopeMatching(), getDeclAvailability(), getDeclContext(), getDeclContextForTemplateInstationPattern(), getDeclForLocalLookup(), clang::TemplateArgument::getDependence(), clang::diff::getEnclosingDeclContext(), getExternalSourceSymbolAttr(), clang::ASTImporter::getFieldIndex(), clang::ASTContext::getMemberPointerPathAdjustment(), getMethodReceiverIfKnownImmutable(), getNonTransparentDeclContext(), clang::ASTContext::getObjContainingInterface(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), getOutermostFuncOrBlockContext(), clang::ObjCMethodDecl::getOverriddenMethods(), clang::FieldDecl::getParent(), clang::ConstructorUsingShadowDecl::getParent(), getParentFunctionOrMethod(), clang::diff::SyntaxTree::Impl::getRelativeName(), clang::ObjCMethodDecl::getSendResultType(), clang::Sema::getShadowedDeclaration(), clang::ParmVarDecl::getSourceRange(), getStackIndexOfNearestEnclosingCaptureReadyLambda(), getStaticDeclName(), clang::LifetimeExtendedTemporaryDecl::getStorageDuration(), clang::index::getSymbolInfo(), getTemplateDepth(), clang::Sema::getTemplateInstantiationArgs(), getTranslationUnitDecl(), clang::ObjCPropertyDecl::getUsageType(), clang::ObjCIvarDecl::getUsageType(), clang::ento::MemRegionManager::getVarRegion(), handleCmseNSEntryAttr(), clang::index::IndexingContext::handleDecl(), clang::Sema::HandleDelayedAccessCheck(), handleIBOutletCollection(), handleObjCDesignatedInitializer(), handleObjCDirectAttr(), clang::Sema::HandlePropertyInClassExtension(), clang::Sema::handleTagNumbering(), handleWeakRefAttr(), hasAcceptableMemberSpecialization(), hasCopyOrMoveCtorParam(), hasWrittenStorageAttribute(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), clang::Sema::HideUsingShadowDecl(), clang::Sema::IdentifyCUDATarget(), clang::ASTImporter::Import(), clang::ASTNodeImporter::ImportDeclContext(), clang::ASTNodeImporter::ImportDeclParts(), clang::Sema::inferGslPointerAttribute(), InNamespace(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::InstantiateVariableDefinition(), clang::Sema::InstantiateVariableInitializer(), isAncestorDeclContextOf(), clang::LookupResult::isAvailableForLookup(), clang::isBetterOverloadCandidate(), isCapturingReferenceToHostVarInCUDADeviceLambda(), clang::dataflow::isCheckLikeMethod(), clang::ento::CheckerContext::isCLibraryFunction(), isConsumerInterestedIn(), clang::NamedDecl::isCXXClassMember(), isDebuggingContext(), clang::IdentifierResolver::isDeclInScope(), isDeclWithinFunction(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), isFunctionLocalClass(), clang::FunctionDecl::isGlobal(), isInAnonymousNamespace(), clang::RecordDecl::isInjectedClassName(), isInStdNamespace(), clang::AnalysisDeclContext::isInStdNamespace(), isInStlNamespace(), clang::CXXRecordDecl::isInterfaceLike(), clang::CXXRecordDecl::isLocalClass(), clang::FunctionDecl::isMain(), isMethodContextSameForKindofLookup(), isMethodDeclaredInRootProtocol(), clang::FunctionDecl::isMSVCRTEntryPoint(), isObjCMethodWithTypeParams(), clang::Expr::isObjCSelfExpr(), isOutOfLine(), isOutOfScopePreviousDeclaration(), IsRecordContextStructurallyEquivalent(), isReferenceToNonConstCapture(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::NamedDecl::isReserved(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::ASTContext::isSameEntity(), isSingleLineLanguageLinkage(), clang::VarDecl::isStaticDataMember(), clang::Sema::isStdInitializerList(), clang::ento::smartptr::isStdSmartPtr(), IsStructurallyEquivalent(), clang::ODRHash::isSubDeclToBeProcessed(), isTemplated(), clang::index::IndexingContext::isTemplateImplicitInstantiation(), isTrackedVar(), IsUserDefinedConversion(), clang::Sema::isUsualDeallocationFunction(), clang::CXXMethodDecl::isUsualDeallocationFunction(), clang::Sema::LazilyCreateBuiltin(), LookupMemberExpr(), clang::Sema::LookupOrCreateLabel(), clang::DeclContext::makeDeclVisibleInContext(), clang::MangleContext::mangleObjCMethodName(), clang::ASTImporter::MapImported(), clang::Sema::MarkFunctionReferenced(), MatchesFriend(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::mergeObjCMethodDecls(), mergeParamDeclAttributes(), MightInstantiateTo(), clang::tooling::stdlib::Recognizer::operator()(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::PrintInstantiationStack(), clang::NamedDecl::printNestedNameSpecifier(), clang::NamedDecl::printQualifiedName(), clang::Sema::ProcessPropertyDecl(), RecordModifiableNonNullParam(), clang::ASTImporterLookupTable::remove(), clang::DeclContext::removeDecl(), clang::tooling::replaceNestedName(), ResolveConstructorOverload(), setLexicalDeclContext(), clang::FunctionDecl::setPure(), shouldAddReversedEqEq(), shouldConsiderLinkage(), ShouldDiagnoseAvailabilityInContext(), ShouldDiagnoseUnusedDecl(), clang::Sema::shouldLinkDependentDeclWithPrevious(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::Sema::SubstDefaultArgument(), SubstDefaultTemplateArgument(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), clang::IdentifierResolver::tryAddTopLevelDecl(), clang::Sema::tryCaptureOpenMPLambdas(), clang::Sema::tryCaptureVariable(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), clang::ASTImporterLookupTable::update(), ValidDuplicateEnum(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), clang::ASTNodeImporter::VisitAccessSpecDecl(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionTemplateDecl(), clang::JSONNodeDumper::VisitNamedDecl(), clang::ASTDeclReader::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTNodeImporter::VisitStaticAssertDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::extractapi::ExtractAPIVisitor::VisitVarDecl(), and clang::ASTDeclWriter::VisitVarDecl().
|
inline |
Definition at line 446 of file DeclBase.h.
References getDeclContext().
const char * Decl::getDeclKindName | ( | ) | const |
Definition at line 123 of file DeclBase.cpp.
Referenced by dump(), clang::TextNodeDumper::dumpBareDeclRef(), clang::ASTDeclWriter::Emit(), clang::ASTNodeImporter::ImportDeclParts(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), clang::ASTNodeImporter::VisitDecl(), and clang::ASTNodeImporter::VisitImportDecl().
const Attr * Decl::getDefiningAttr | ( | ) | const |
Return this declaration's defining attribute if it has one.
Definition at line 520 of file DeclBase.cpp.
TemplateDecl * Decl::getDescribedTemplate | ( | ) | const |
If this is a declaration that describes some template, this method returns that template declaration.
Note that this returns nullptr for partial specializations, because they are not modeled as TemplateDecls. Use getDescribedTemplateParams to handle those cases.
Definition at line 239 of file DeclBase.cpp.
Referenced by getDescribedTemplate(), and getDescribedTemplateParams().
const TemplateParameterList * Decl::getDescribedTemplateParams | ( | ) | const |
If this is a declaration that describes some template or partial specialization, this returns the corresponding template parameter list.
Definition at line 252 of file DeclBase.cpp.
References getDescribedTemplate().
Referenced by getTemplateDepth(), and isTemplated().
|
inline |
Definition at line 428 of file DeclBase.h.
References clang::SourceRange::getEnd(), and getSourceRange().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::TemplateDeclInstantiator::adjustForRewrite(), clang::Sema::checkFinalSuspendNoThrow(), checkTypeParamListConsistency(), ComputeDefaultedComparisonExceptionSpec(), clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), GenerateFixForUnusedDecl(), clang::tooling::getAssociatedRange(), clang::ExportDecl::getEndLoc(), clang::LinkageSpecDecl::getEndLoc(), clang::CoroutineBodyStmt::getEndLoc(), clang::UsingDecl::getSourceRange(), clang::UnresolvedUsingValueDecl::getSourceRange(), clang::ObjCTypeParamDecl::getSourceRange(), clang::OMPCapturedExprDecl::getSourceRange(), clang::TemplateTypeParmDecl::getSourceRange(), clang::ento::PathDiagnosticLocation::getValidSourceLocation(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), maybeRecoverWithZeroInitialization(), RedeclarePropertyAccessor(), clang::CodeGen::CodeGenModule::Release(), rewriteToNSEnumDecl(), rewriteToNSMacroDecl(), SuggestInitializationFixit(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), and clang::ASTDeclWriter::VisitImportDecl().
ExternalSourceSymbolAttr * Decl::getExternalSourceSymbolAttr | ( | ) | const |
Looks on this and related declarations for an applicable external source symbol attribute.
Definition at line 494 of file DeclBase.cpp.
References clang::ast_matchers::attr, clang::Definition, and getDeclContext().
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 1185 of file DeclBase.h.
References FOK_Declared, FOK_None, FOK_Undeclared, IDNS_Ordinary, IDNS_OrdinaryFriend, IDNS_Tag, and IDNS_TagFriend.
Referenced by clang::Sema::ActOnPureSpecifier(), clang::Sema::ArgumentDependentLookup(), clang::Sema::canFullyTypeCheckRedeclaration(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), CheckMultiVersionAdditionalDecl(), clang::Sema::CheckOverload(), clang::Sema::CheckRedeclarationModuleOwnership(), clang::Sema::ConstraintExpressionDependsOnEnclosingTemplate(), DiagnoseInvalidRedeclaration(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FriendConstraintsDependOnEnclosingTemplate(), clang::ASTContext::FriendsDifferByConstraints(), clang::TemplateName::getNameToSubstitute(), getTemplateDepth(), clang::Sema::InstantiateClass(), isTemplated(), clang::FunctionDecl::isThisDeclarationInstantiatedFromAFriendDefinition(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), clang::serialization::needsAnonymousDeclarationNumber(), shouldBeHidden(), 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 1032 of file DeclBase.cpp.
References clang::Type::castAs(), clang::Type::getAs(), clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), and clang::Type::isFunctionReferenceType().
Referenced by getFunctionOrMethodNumParams(), getFunctionOrMethodParamType(), getFunctionOrMethodResultType(), handleNonNullAttrParameter(), handleRISCVInterruptAttr(), handleSentinelAttr(), handleWarnUnusedResult(), hasFunctionProto(), isFunctionOrMethod(), isFunctionOrMethodVariadic(), and sameFunctionParameterTypeLists().
|
inline |
Retrieve the global declaration ID associated with this declaration, which specifies where this Decl was loaded from.
Definition at line 755 of file DeclBase.h.
References isFromASTFile().
Referenced by clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), and clang::ASTReader::getOwningModuleFile().
int64_t Decl::getID | ( | ) | const |
Definition at line 1028 of file DeclBase.cpp.
References clang::ASTContext::getAllocator(), and getASTContext().
Referenced by clang::ento::NonParamVarRegion::dumpToStream(), and clang::ento::ParamVarRegion::dumpToStream().
|
inline |
Definition at line 854 of file DeclBase.h.
Referenced by clang::Sema::ArgumentDependentLookup(), clang::Sema::FilterUsingLookup(), hasTagIdentifierNamespace(), isInIdentifierNamespace(), setLocalExternDecl(), setObjectOfFriendDecl(), clang::UsingShadowDecl::setTargetDecl(), shouldBeHidden(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTDeclWriter::VisitRedeclarableTemplateDecl(), clang::ASTDeclWriter::VisitTagDecl(), and clang::ASTDeclWriter::VisitUsingShadowDecl().
Definition at line 750 of file DeclBase.cpp.
References clang::Block, Enum, IDNS_Label, IDNS_Member, IDNS_Namespace, IDNS_ObjCProtocol, IDNS_OMPMapper, 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 778 of file DeclBase.h.
References hasOwningModule(), and isFromASTFile().
Referenced by clang::Sema::CheckTemplateParameterList(), getOwningModule(), clang::ODRDiagsEmitter::getOwningModuleNameForDiagnostic(), isConsumerInterestedIn(), and clang::ASTReader::mergeDefinitionVisibility().
|
inline |
Definition at line 435 of file DeclBase.h.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::ODRHash::AddDecl(), clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), clang::ASTDeclReader::attachLatestDecl(), clang::ASTDeclReader::attachPreviousDecl(), clang::Sema::BuildDeclarationNameExpr(), castToDeclContext(), clang::Sema::CheckTemplateArgumentList(), clang::TranslationUnitDecl::classof(), clang::PragmaCommentDecl::classof(), clang::PragmaDetectMismatchDecl::classof(), clang::ExternCContextDecl::classof(), clang::NamedDecl::classof(), clang::LabelDecl::classof(), clang::NamespaceDecl::classof(), clang::ValueDecl::classof(), clang::DeclaratorDecl::classof(), clang::VarDecl::classof(), clang::ImplicitParamDecl::classof(), clang::ParmVarDecl::classof(), clang::FunctionDecl::classof(), clang::FieldDecl::classof(), clang::EnumConstantDecl::classof(), clang::IndirectFieldDecl::classof(), clang::TypeDecl::classof(), clang::TypedefNameDecl::classof(), clang::TypedefDecl::classof(), clang::TypeAliasDecl::classof(), clang::TagDecl::classof(), clang::EnumDecl::classof(), clang::RecordDecl::classof(), clang::FileScopeAsmDecl::classof(), clang::TopLevelStmtDecl::classof(), clang::CapturedDecl::classof(), clang::ExportDecl::classof(), clang::EmptyDecl::classof(), clang::HLSLBufferDecl::classof(), clang::DeclContext::classof(), clang::AccessSpecDecl::classof(), clang::CXXRecordDecl::classof(), clang::CXXDeductionGuideDecl::classof(), clang::RequiresExprBodyDecl::classof(), clang::CXXMethodDecl::classof(), clang::CXXConstructorDecl::classof(), clang::CXXDestructorDecl::classof(), clang::CXXConversionDecl::classof(), clang::LinkageSpecDecl::classof(), clang::UsingDirectiveDecl::classof(), clang::NamespaceAliasDecl::classof(), clang::LifetimeExtendedTemporaryDecl::classof(), clang::UsingShadowDecl::classof(), clang::BaseUsingDecl::classof(), clang::UsingDecl::classof(), clang::ConstructorUsingShadowDecl::classof(), clang::UsingEnumDecl::classof(), clang::UsingPackDecl::classof(), clang::UnresolvedUsingValueDecl::classof(), clang::UnresolvedUsingTypenameDecl::classof(), clang::UnresolvedUsingIfExistsDecl::classof(), clang::StaticAssertDecl::classof(), clang::BindingDecl::classof(), clang::DecompositionDecl::classof(), clang::MSPropertyDecl::classof(), clang::MSGuidDecl::classof(), clang::UnnamedGlobalConstantDecl::classof(), clang::FriendDecl::classof(), clang::ObjCMethodDecl::classof(), clang::ObjCTypeParamDecl::classof(), clang::ObjCPropertyDecl::classof(), clang::ObjCContainerDecl::classof(), clang::ObjCInterfaceDecl::classof(), clang::ObjCIvarDecl::classof(), clang::ObjCAtDefsFieldDecl::classof(), clang::ObjCProtocolDecl::classof(), clang::ObjCCategoryDecl::classof(), clang::ObjCImplDecl::classof(), clang::ObjCCategoryImplDecl::classof(), clang::ObjCImplementationDecl::classof(), clang::ObjCCompatibleAliasDecl::classof(), clang::ObjCPropertyImplDecl::classof(), clang::OMPThreadPrivateDecl::classof(), clang::OMPDeclareReductionDecl::classof(), clang::OMPDeclareMapperDecl::classof(), clang::OMPRequiresDecl::classof(), clang::OMPAllocateDecl::classof(), clang::TemplateDecl::classof(), clang::RedeclarableTemplateDecl::classof(), clang::FunctionTemplateDecl::classof(), clang::NonTypeTemplateParmDecl::classof(), clang::TemplateTemplateParmDecl::classof(), clang::BuiltinTemplateDecl::classof(), clang::ClassTemplateSpecializationDecl::classof(), clang::ClassTemplatePartialSpecializationDecl::classof(), clang::ClassTemplateDecl::classof(), clang::FriendTemplateDecl::classof(), clang::TypeAliasTemplateDecl::classof(), clang::ClassScopeFunctionSpecializationDecl::classof(), clang::VarTemplateSpecializationDecl::classof(), clang::VarTemplatePartialSpecializationDecl::classof(), clang::VarTemplateDecl::classof(), clang::ConceptDecl::classof(), clang::ImplicitConceptSpecializationDecl::classof(), clang::TemplateParamObjectDecl::classof(), compareDeclarations(), clang::ASTReader::CompleteRedeclChain(), clang::LinkageComputer::computeLVForDecl(), clang::NamedDecl::declarationReplaces(), clang::ODRDiagsEmitter::diagnoseMismatch(), dumpPreviousDecl(), clang::CodeGen::CodeGenModule::EmitDeferredUnusedCoverageMappings(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::comments::DeclInfo::fill(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::getCursorKindForDecl(), clang::ASTNodeKind::getFromNode(), getKind(), clang::ASTDeclReader::getMostRecentDecl(), clang::Sema::getNamedReturnInfo(), clang::getReplacedTemplateParameterList(), clang::index::getSymbolInfo(), clang::NamedDecl::getUnderlyingDecl(), clang::VarDecl::isFileVarDecl(), clang::VarDecl::isFunctionOrMethodVarDecl(), isInstantiationOf(), clang::VarDecl::isLocalVarDecl(), clang::VarDecl::isLocalVarDeclOrParm(), clang::syntax::TreeBuilder::isResponsibleForCreatingDeclaration(), clang::ASTContext::isSameEntity(), clang::ASTContext::isSameTemplateParameter(), clang::VarDecl::isStaticDataMember(), IsStructurallyEquivalent(), clang::ODRHash::isSubDeclToBeProcessed(), isTemplateParameter(), clang::TemplateDecl::isTypeAlias(), MatchTemplateParameterKind(), clang::ento::CheckerManager::runCheckersOnASTDecl(), setNonMemberOperator(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::declvisitor::Base< Ptr, ImplClass, RetTy >::Visit(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclReader::VisitRedeclarableTemplateDecl(), and clang::ASTDeclWriter::VisitVarDecl().
const LangOptions & Decl::getLangOpts | ( | ) | const |
Helper to get the language options from the ASTContext.
Defined out of line to avoid depending on ASTContext.h.
Definition at line 434 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getLangOpts().
Referenced by clang::transformer::after(), canBeWeakImported(), clang::VarDecl::checkForConstantInitialization(), clang::CXXRecordDecl::defaultedDefaultConstructorIsConstexpr(), clang::CXXRecordDecl::defaultedDestructorIsConstexpr(), clang::GlobalDecl::getDefaultKernelReference(), clang::FunctionDecl::getMinRequiredArguments(), clang::VarDecl::getTLSKind(), clang::VarDecl::hasConstantInitialization(), clang::CXXRecordDecl::isLiteral(), and clang::tooling::stdlib::Recognizer::operator()().
|
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 883 of file DeclBase.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), clang::Sema::AddInitializerToDecl(), adjustDeclContextForDeclaratorDecl(), clang::Sema::ArgumentDependentLookup(), clang::Sema::BuildVariableInstantiation(), clang::Sema::canFullyTypeCheckRedeclaration(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckForFunctionRedefinition(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckRedeclarationExported(), checkTupleLikeDecomposition(), clang::Sema::CompleteLambdaCallOperator(), clang::ASTReader::CompleteRedeclChain(), clang::DeclContext::containsDecl(), clang::Sema::DiagnoseDeletedDefaultedFunction(), DiagUninitUse(), clang::Sema::FindInstantiatedDecl(), clang::ASTContext::FriendsDifferByConstraints(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), clang::ASTWriter::getAnonymousDeclarationNumber(), getContextForScopeMatching(), getDefiningModule(), getEnclosingExportDecl(), getFriendCountAndPosition(), getLexicalDeclContext(), getParentFunctionOrMethod(), getTemplateDepth(), clang::Sema::HandleDelayedAccessCheck(), hasAcceptableMemberSpecialization(), clang::ASTNodeImporter::ImportDeclContext(), clang::Sema::InstantiateVariableDefinition(), clang::ClassTemplateSpecializationDecl::isClassScopeExplicitSpecialization(), clang::VarTemplateSpecializationDecl::isClassScopeExplicitSpecialization(), clang::VarDecl::isFileVarDecl(), clang::VarDecl::isFunctionOrMethodVarDecl(), isInExportDeclContext(), clang::VarDecl::isInExternCContext(), clang::FunctionDecl::isInExternCContext(), clang::VarDecl::isInExternCXXContext(), clang::FunctionDecl::isInExternCXXContext(), isInLocalScopeForInstantiation(), clang::VarDecl::isLocalVarDecl(), isOutOfLine(), isTemplated(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), mergeTypeWithPrevious(), clang::Sema::MergeVarDecl(), clang::serialization::needsAnonymousDeclarationNumber(), RedeclForcesDefC99(), clang::Sema::RegisterLocallyScopedExternCDecl(), clang::DeclContext::removeDecl(), clang::Sema::SetDeclDefaulted(), setLexicalDeclContext(), clang::Sema::shouldLinkDependentDeclWithPrevious(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().
|
inline |
Definition at line 888 of file DeclBase.h.
References getLexicalDeclContext().
|
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 787 of file DeclBase.h.
References hasLocalOwningModuleStorage(), hasOwningModule(), and isFromASTFile().
Referenced by getOwningModule().
|
inline |
Definition at line 432 of file DeclBase.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCompatibilityAlias(), clang::Sema::ActOnCompoundStmt(), clang::Sema::ActOnConceptDefinition(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXConditionDeclaration(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForStmt(), clang::Sema::ActOnForwardClassDeclaration(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnLabelStmt(), clang::Sema::ActOnLambdaExpressionAfterIntroducer(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnMSAsmStmt(), clang::Sema::ActOnNamespaceAliasDef(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPAllocateDirective(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDeclareReductionCombinerStart(), clang::Sema::ActOnOpenMPDeclareReductionInitializerStart(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnOpenMPLastprivateClause(), 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::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnStartProtocolInterface(), clang::Sema::ActOnSuperClassOfClassInterface(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnVariableDeclarator(), clang::ASTUnit::addFileLevelDecl(), addFunctionPointerConversion(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::addInitCapture(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), applyObjCTypeArgs(), clang::Sema::areMultiversionVariantFunctionsCompatible(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::Sema::AtomicPropertySetterGetterRules(), clang::Sema::AttachTypeConstraint(), 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(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildIvarRefExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildMicrosoftCAnonymousStruct(), BuildNonArrayForRange(), clang::Sema::BuildResolvedCallExpr(), buildStdNoThrowDeclRef(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingEnumDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuiltinEnumUnderlyingType(), clang::ento::ObjCMethodCall::canBeOverridenInSubclass(), canonicalizeImmediatelyDeclaredConstraint(), clang::canVarDeclThrow(), captureInBlock(), captureInLambda(), checkAddressOfFunctionIsAvailable(), clang::Sema::checkAllowedCUDAInitializer(), CheckAnonMemberRedeclaration(), clang::Sema::CheckARCMethodDecl(), checkARCPropertyImpl(), checkAtomicPropertyMismatch(), checkAttributesAfterMerging(), clang::Sema::CheckBaseSpecifier(), clang::threadSafety::BeforeSet::checkBeforeAfter(), clang::interp::CheckCallable(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCoroutineBody(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConceptRedefinition(), clang::Sema::CheckConceptTemplateId(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprDestructorSubobjects(), CheckConstexprFunction(), CheckConstexprFunctionBody(), clang::Sema::CheckConstexprFunctionDefinition(), CheckConstexprParameterTypes(), CheckConstexprReturnType(), checkCUDADeviceBuiltinSurfaceClassTemplate(), checkCUDADeviceBuiltinTextureClassTemplate(), clang::Sema::checkCUDATargetOverload(), clang::Sema::CheckCXXDefaultArguments(), checkDeclInTargetContext(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDeductionGuideTemplate(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), clang::Sema::CheckDestructor(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckEquivalentExceptionSpec(), checkEscapingByref(), CheckExplicitInstantiationScope(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckForFunctionRedefinition(), checkForMultipleExportedDefaultConstructors(), CheckForReference(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionConstraints(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), checkGlobalOrExternCConflict(), clang::Sema::CheckHLSLEntryPoint(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), clang::Sema::CheckImplementationIvars(), clang::Sema::checkInitializerLifetime(), clang::Sema::checkInitMethod(), checkIsValidOpenCLKernelParameter(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), CheckLocalVariableDeclaration(), clang::Sema::CheckMain(), checkMemberDecomposition(), clang::Sema::CheckMemberSpecialization(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), checkMoreSpecializedThanPrimary(), clang::Sema::checkMSInheritanceAttrOnDefinition(), clang::Sema::CheckMSVCRTEntryPoint(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionAdditionalRules(), CheckMultiVersionFunction(), CheckMultiVersionValue(), checkNewAttributesAfterDef(), checkNonMultiVersionCompatAttributes(), clang::Sema::CheckNontrivialField(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckObjCDeclScope(), checkObjCDirectMethodClashes(), clang::Sema::CheckObjCMethodDirectOverrides(), clang::Sema::CheckObjCMethodOverride(), checkObjCUnusedIvar(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::checkOpenMPDeclareVariantFunction(), clang::Sema::CheckOpenMPLinearDecl(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionAttributes(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckParameter(), CheckPoppedLabel(), checkPropertyDeclWithOwnership(), CheckProtocolMethodDefs(), clang::interp::CheckPure(), clang::Sema::CheckPureMethod(), clang::Sema::CheckRedeclarationExported(), clang::Sema::CheckRedeclarationModuleOwnership(), clang::Sema::checkRetainCycles(), clang::Sema::CheckShadow(), clang::Sema::CheckShadowingDeclModification(), checkSimpleDecomposition(), CheckSimplerImplicitMovesMSVCWorkaround(), clang::Sema::CheckSpecializationInstantiationRedecl(), clang::Sema::CheckSwitchCondition(), CheckTargetCausesMultiVersioning(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTemplateParameterList(), CheckTemplateSpecializationScope(), clang::Sema::CheckTemplateTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckThreadLocalForLargeAlignment(), CheckTrivialDefaultConstructor(), checkTrivialSubobjectCall(), checkTupleLikeDecomposition(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckTypenameType(), checkTypeParamListConsistency(), clang::Sema::checkTypeSupport(), checkUndefinedButUsed(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::CheckUsingShadowDecl(), checkUsingShadowRedecl(), clang::Sema::checkVarDeclRedefinition(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CheckVirtualDtorCall(), compare(), clang::Sema::CompleteLambdaCallOperator(), ComputeDefaultedComparisonExceptionSpec(), ComputeDefaultedSpecialMemberExceptionSpec(), clang::Sema::ConvertArgumentsForCall(), ConvertDeducedTemplateArgument(), ConvertDeducedTemplateArguments(), clang::Sema::ConvertParamDefaultArgument(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreatePropertyDecl(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), DeduceNullPtrTemplateArgument(), clang::Sema::DeduceReturnType(), clang::Sema::deduceVarTypeFromInitializer(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), diagExportedUnnamedDecl(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseAmbiguousLookup(), DiagnoseArityMismatch(), clang::Sema::DiagnoseAssignmentResult(), clang::Sema::DiagnoseAutoDeductionFailure(), DiagnoseBadConversion(), DiagnoseBadDeduction(), diagnoseBadDirectAccess(), DiagnoseCalleeStaticArrayParam(), DiagnoseCategoryDirectMembersProtocolConformance(), clang::Sema::DiagnoseClassExtensionDupMethods(), DiagnoseConstAssignment(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), diagnoseDeprecatedCopyOperation(), DiagnoseDirectIsaAccess(), clang::Sema::DiagnoseDuplicateIvars(), clang::Sema::diagnoseEquivalentInternalLinkageDeclarations(), clang::Sema::diagnoseExprIntendedAsTemplateName(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Sema::DiagnoseHiddenVirtualMethods(), DiagnoseInvalidRedeclaration(), clang::ODRDiagsEmitter::diagnoseMismatch(), diagnoseMissingArgument(), diagnoseMissingConstinit(), clang::Sema::DiagnoseMissingDesignatedInitOverrides(), clang::Sema::diagnoseMissingImport(), DiagnoseNamespaceInlineMismatch(), diagnoseNoescape(), clang::Sema::DiagnoseNontrivial(), DiagnoseObjCImplementedDeprecations(), diagnoseOpenCLTypes(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseShadowingLambdaDecls(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::Sema::DiagnoseTemplateParameterShadow(), diagnoseUncapturableValueReferenceOrBinding(), DiagnoseUnimplementedAccessor(), DiagnoseUninitializedUse(), clang::Sema::DiagnoseUninstantiableTemplate(), clang::Sema::DiagnoseUnusedBackingIvarInAccessor(), clang::Sema::DiagnoseUnusedButSetDecl(), clang::Sema::DiagnoseUnusedDecl(), clang::Sema::DiagnoseUseOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), diagnoseVarDeclTypeMismatch(), DiagnoseVariableSizedIvars(), diagReturnOnAllocFailure(), DiagUninitUse(), DoEmitAvailabilityWarning(), emitCombinerOrInitializer(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), EmitDiagForCXXThrowInNonThrowingFunc(), clang::CodeGen::CGDebugInfo::EmitExternalVariable(), clang::CodeGen::CGDebugInfo::EmitFuncDeclForCallSite(), clang::CodeGen::CGDebugInfo::EmitGlobalAlias(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), emitInitWithReductionInitializer(), clang::CodeGen::CGDebugInfo::EmitLabel(), emitMappingInformation(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), emitOutlinedFunctionPrologue(), emitPreserveStructAccess(), emitReadOnlyPlacementAttrWarning(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), clang::CodeGen::CGDebugInfo::EmitUsingShadowDecl(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), clang::Expr::EvaluateAsInitializer(), clang::Sema::FinalizeDeclaration(), clang::Sema::FinalizeDeclaratorGroup(), clang::Sema::FinalizeVarWithDestructor(), clang::Sema::FindAllocationFunctions(), FindBaseInitializer(), findCompleteObject(), clang::Sema::findInheritingConstructor(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FindProtocolDeclaration(), findSubobject(), clang::AccessSpecDecl::getAccessSpecifierLoc(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::NamespaceAliasDecl::getAliasLoc(), clang::FileScopeAsmDecl::getAsmLoc(), clang::ObjCMethodDecl::getBeginLoc(), clang::BlockDecl::getCaretLocation(), getDeclLocForCommentSearch(), GetDeclSpecTypeForDeclarator(), clang::Sema::getDestructorName(), clang::ExportDecl::getEndLoc(), clang::LinkageSpecDecl::getEndLoc(), GetEndLoc(), clang::ObjCInterfaceDecl::getEndOfDefinitionLoc(), clang::ExportDecl::getExportLoc(), GetFullTypeForDeclarator(), clang::AnalysisDeclContext::getFunctionName(), clang::UsingDirectiveDecl::getIdentLocation(), getInitializationLoc(), GetLocationForCandidate(), clang::FunctionDecl::getNameInfo(), clang::UsingDecl::getNameInfo(), clang::UnresolvedUsingValueDecl::getNameInfo(), clang::UnresolvedUsingTypenameDecl::getNameInfo(), getQualifiedNameStart(), clang::CXXCtorInitializer::getSourceLocation(), getSourceRange(), clang::LabelDecl::getSourceRange(), clang::DeclaratorDecl::getSourceRange(), clang::VarDecl::getSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::EnumConstantDecl::getSourceRange(), clang::TypeDecl::getSourceRange(), clang::TypedefDecl::getSourceRange(), clang::TagDecl::getSourceRange(), clang::TopLevelStmtDecl::getSourceRange(), clang::BlockDecl::getSourceRange(), clang::ImportDecl::getSourceRange(), clang::ExportDecl::getSourceRange(), clang::UsingDirectiveDecl::getSourceRange(), clang::StaticAssertDecl::getSourceRange(), clang::FriendDecl::getSourceRange(), clang::ObjCMethodDecl::getSourceRange(), clang::ObjCTypeParamDecl::getSourceRange(), clang::ObjCPropertyDecl::getSourceRange(), clang::ObjCInterfaceDecl::getSourceRange(), clang::ObjCProtocolDecl::getSourceRange(), clang::ObjCPropertyImplDecl::getSourceRange(), clang::TemplateTemplateParmDecl::getSourceRange(), getTupleLikeElementType(), clang::Sema::getTypeName(), clang::ento::MemRegionManager::getVarRegion(), handleAVRInterruptAttr(), handleAVRSignalAttr(), handleCleanupAttr(), clang::index::IndexingContext::handleDecl(), handleDestroyAttr(), clang::Sema::HandleExprPropertyRefExpr(), handleFormatAttr(), HandleImmediateInvocations(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), handleNoBuiltinAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleObjCDesignatedInitializer(), handleObjCIndependentClass(), handleObjCNSObject(), clang::Sema::HandlePropertyInClassExtension(), handleRISCVInterruptAttr(), handleSwiftAsyncAttr(), handleSYCLKernelAttr(), handleTargetClonesAttr(), handleTransparentUnionAttr(), handleWebAssemblyExportNameAttr(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), clang::Sema::ImplicitlyDefineFunction(), clang::ASTNodeImporter::ImportDeclParts(), clang::ASTNodeImporter::ImportDefinition(), clang::index::IndexingContext::importedModule(), clang::index::IndexingContext::indexTopLevelDecl(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), instantiateOMPDeclareVariantAttr(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::InstantiateVariableDefinition(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::Sema::isAcceptableTagRedeclaration(), clang::TagTypeLoc::isDefinition(), isForbiddenTypeAllowed(), isFromSystemHeader(), clang::LabelDecl::isGnuLocal(), clang::Sema::isIncompatibleTypedef(), clang::ento::CallEvent::isInSystemHeader(), clang::ObjCPropertyImplDecl::isIvarNameSpecified(), isNullPointerValueTemplateArgument(), clang::Sema::IsOverload(), clang::Expr::isPotentialConstantExpr(), isStandardNewDelete(), IsStructurallyEquivalent(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), isVariableCapturable(), lookupCoroutineHandleType(), clang::Sema::lookupCoroutineTraits(), lookupPromiseType(), clang::Sema::LookupSpecialMember(), LookupStdInitializerList(), lookupStdTypeTraitMember(), clang::Sema::LookupTemplateName(), MarkVarDeclODRUsed(), clang::Sema::MarkVirtualBaseDestructorsReferenced(), MatchTemplateParameterKind(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), clang::RecordDecl::mayInsertExtraPadding(), mergeAlignedAttrs(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::mergeDeclAttributes(), clang::Sema::MergeFunctionDecl(), mergeInterfaceMethodToImpl(), mergeObjCDirectMembers(), mergeParamDeclAttributes(), mergeParamDeclTypes(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::NoteAllFoundTemplates(), clang::Sema::NoteDeletedFunction(), clang::Sema::NoteDeletedInheritingConstructor(), NoteFunctionCandidate(), clang::Sema::NoteHiddenVirtualMethods(), NoteLValueLocation(), noteNonDeducibleParameters(), clang::Sema::NoteOverloadCandidate(), noteOverloads(), clang::Sema::notePreviousDefinition(), NoteSurrogateCandidate(), clang::Sema::ParseObjCProtocolExpression(), clang::Sema::ParseObjCSelectorExpression(), clang::Sema::ParseTypedefDecl(), clang::Sema::PerformObjectArgumentInitialization(), clang::Sema::PerformOpenMPImplicitIntegerConversion(), clang::PrettyStackTraceDecl::print(), clang::PrettyDeclStackTraceEntry::print(), clang::CodeGen::CodeGenModule::printPostfixForExternalizedDecl(), ProcessDeclAttribute(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), clang::Sema::propagateDLLAttrToBaseClassTemplate(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildObjCExceptionDecl(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), rejectConstNotMutableType(), clang::CodeGen::SanitizerMetadata::reportGlobal(), reportOriginalDsa(), ReportOverrides(), clang::Sema::RequireCompleteEnumDecl(), clang::Sema::RequireLiteralType(), resolveBuiltinNewDeleteOverload(), rewriteBuiltinFunctionDecl(), rewriteToObjCInterfaceDecl(), clang::consumed::ConsumedAnalyzer::run(), selectBestPath(), clang::Sema::SetDeclDeleted(), clang::CodeGen::CodeGenModule::setGlobalVisibility(), clang::Sema::SetIvarInitializers(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::setTagNameForLinkagePurposes(), clang::Sema::ShouldDeleteSpecialMember(), shouldIgnoreDueToReservedName(), clang::Sema::SpecialMemberIsTrivial(), clang::Sema::SubstDecl(), clang::Sema::SubstDefaultArgument(), clang::TemplateDeclInstantiator::SubstDefaultedFunction(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstParmVarDecl(), SuggestInitializationFixit(), clang::TreeTransform< Derived >::TransformCondition(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), clang::Sema::tryCaptureVariable(), TryDiagnoseProtectedAccess(), TryOrBuildParenListInitialization(), clang::Sema::UnifySection(), validateBoxingMethod(), validateDeclsInsideHLSLBuffer(), ValidateObjCLiteralInterfaceDecl(), clang::Sema::VerifyIntegerConstantExpression(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), clang::ASTNodeImporter::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitDecl(), clang::ASTNodeImporter::VisitEmptyDecl(), clang::extractapi::ExtractAPIVisitor::VisitEnumDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::extractapi::ExtractAPIVisitor::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitImportDecl(), clang::ASTNodeImporter::VisitLinkageSpecDecl(), clang::tooling::RecursiveSymbolVisitor< T >::VisitNamedDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::extractapi::ExtractAPIVisitor::VisitObjCCategoryDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::extractapi::ExtractAPIVisitor::VisitObjCInterfaceDecl(), clang::ASTDeclReader::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::extractapi::ExtractAPIVisitor::VisitObjCProtocolDecl(), clang::ASTNodeImporter::VisitObjCTypeParamDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::extractapi::ExtractAPIVisitor::VisitRecordDecl(), clang::ASTNodeImporter::VisitStaticAssertDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), clang::extractapi::ExtractAPIVisitor::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitUsingEnumDecl(), clang::extractapi::ExtractAPIVisitor::VisitVarDecl(), clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl(), clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl(), clang::Sema::WarnConflictingTypedMethods(), clang::Sema::WarnExactTypedMethods(), clang::Sema::WarnOnPendingNoDerefs(), clang::Sema::warnOnReservedIdentifier(), and WarnUndefinedMethod().
unsigned Decl::getMaxAlignment | ( | ) | const |
getMaxAlignment - return the maximum alignment specified by attributes on this decl, 0 if there are none.
Definition at line 442 of file DeclBase.cpp.
References getASTContext(), getAttrs(), hasAttrs(), and V.
Referenced by clang::ASTContext::getDeclAlign(), getDeclAlignIfRequired(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
|
inline |
Get the kind of module ownership for this declaration.
Definition at line 841 of file DeclBase.h.
References NextInContextAndBits.
Referenced by hasOwningModule(), isExportedFromModuleInterfaceUnit(), isInvisibleOutsideTheOwningModule(), isModulePrivate(), isReachable(), isUnconditionallyVisible(), setLexicalDeclContext(), setModuleOwnershipKind(), setModulePrivate(), and clang::ASTDeclWriter::VisitDecl().
|
inline |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration).
Definition at line 1041 of file DeclBase.h.
References getMostRecentDeclImpl().
Referenced by clang::ASTDeclWriter::AddFirstDeclFromEachModule(), forAllLaterRedecls(), clang::TemplateName::getNameToSubstitute(), clang::ASTContext::getTranslationUnitDecl(), isUsed(), isWeakImported(), 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 1045 of file DeclBase.h.
References getMostRecentDeclImpl().
|
inlineprotectedvirtual |
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.
Reimplemented in clang::VarDecl, clang::FunctionDecl, clang::TypedefNameDecl, and clang::TagDecl.
Definition at line 964 of file DeclBase.h.
Referenced by getMostRecentDecl().
|
inline |
Definition at line 438 of file DeclBase.h.
References NextInContextAndBits.
Referenced by clang::DeclContext::addHiddenDecl(), clang::syntax::TreeBuilder::isResponsibleForCreatingDeclaration(), and clang::DeclContext::localUncachedLookup().
|
inline |
Definition at line 439 of file DeclBase.h.
References NextInContextAndBits.
|
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::VarDecl, clang::FunctionDecl, clang::TypedefNameDecl, and clang::TagDecl.
Definition at line 956 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 1089 of file DeclBase.cpp.
Referenced by getNonClosureContext(), and clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl().
|
inline |
Definition at line 464 of file DeclBase.h.
References getNonClosureContext().
DeclContext * Decl::getNonTransparentDeclContext | ( | ) |
Return the non transparent context.
See the comment of DeclContext::isTransparentContext()
for the definition of transparent context.
Definition at line 1063 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::getNonTransparentContext().
Referenced by clang::Sema::FindInstantiatedDecl(), and getNonTransparentDeclContext().
|
inline |
Definition at line 454 of file DeclBase.h.
References getNonTransparentDeclContext().
|
inline |
Get the module that owns this declaration (for visibility purposes).
Definition at line 808 of file DeclBase.h.
References getImportedOwningModule(), getLocalOwningModule(), and isFromASTFile().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), clang::Sema::ArgumentDependentLookup(), clang::Sema::CheckRedeclarationModuleOwnership(), clang::Sema::CheckTemplateParameterList(), clang::Sema::getOwningModule(), getOwningModuleForLinkage(), isDeclaredInModuleInterfaceOrPartition(), isInModulePurview(), clang::Sema::IsRedefinitionInModule(), clang::Sema::notePreviousDefinition(), setLexicalDeclContext(), clang::TextNodeDumper::Visit(), and clang::ASTDeclWriter::VisitDecl().
Get the module that owns this declaration for linkage purposes.
There only ever is such a standard C++ module.
IgnoreLinkage | Ignore the linkage of the entity; assume that all declarations in a global module fragment are unowned. |
Definition at line 1587 of file Decl.cpp.
References clang::Module::ExplicitGlobalModuleFragment, getOwningModule(), clang::NamedDecl::hasExternalFormalLinkage(), clang::Module::ImplicitGlobalModuleFragment, clang::InternalLinkage, isInAnonymousNamespace(), clang::Module::Kind, clang::Module::ModuleHeaderUnit, clang::Module::ModuleImplementationUnit, clang::Module::ModuleInterfaceUnit, clang::Module::ModuleMapModule, clang::Module::ModulePartitionImplementation, clang::Module::ModulePartitionInterface, clang::Module::Parent, and clang::Module::PrivateModuleFragment.
Referenced by clang::Sema::CheckRedeclarationModuleOwnership(), clang::NamedDecl::isExternallyDeclarable(), and clang::MangleContext::shouldMangleDeclName().
|
inline |
Retrieve the global ID of the module that owns this particular declaration.
Definition at line 763 of file DeclBase.h.
References isFromASTFile().
|
inline |
Definition at line 936 of file DeclBase.h.
References getParentFunctionOrMethod().
const DeclContext * Decl::getParentFunctionOrMethod | ( | bool | LexicalParent = false | ) | const |
If this decl is defined inside a function/method/block it returns the corresponding DeclContext, otherwise it returns null.
Definition at line 295 of file DeclBase.cpp.
References getDeclContext(), getLexicalDeclContext(), and clang::DeclContext::isFileContext().
Referenced by basicGVALinkageForVariable(), clang::Sema::CheckStaticLocalForDllExport(), clang::CodeGen::CodeGenModule::createUnnamedGlobalFrom(), clang::Sema::FinalizeDeclaration(), getParentFunctionOrMethod(), isDefinedOutsideFunctionOrMethod(), and clang::index::isFunctionLocalSymbol().
|
inline |
Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Definition at line 1026 of file DeclBase.h.
References getPreviousDeclImpl().
Referenced by clang::ASTDeclWriter::AddFirstDeclFromEachModule(), clang::Sema::ArgumentDependentLookup(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckSpecializationInstantiationRedecl(), diagnoseBadDirectAccess(), DoEmitAvailabilityWarning(), clang::ASTDumper::dumpLookups(), clang::LocalInstantiationScope::findInstantiationOf(), forAllLaterRedecls(), clang::VarDecl::getActingDefinition(), getDeclForLocalLookup(), clang::ASTContext::getEnumType(), clang::ASTWriter::getFirstLocalDecl(), clang::ASTContext::getInjectedClassNameType(), clang::TemplateName::getNameToSubstitute(), clang::ASTContext::getRecordType(), clang::Sema::InstantiateFunctionDefinition(), isFirstDecl(), isPreferredLookupResult(), PreviousDeclsHaveMultiVersionAttribute(), setLocalExternDecl(), setObjectOfFriendDecl(), clang::ASTDeclWriter::VisitRedeclarable(), clang::ASTNodeImporter::VisitUnresolvedUsingType(), and clang::Sema::warnOnReservedIdentifier().
|
inline |
Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Definition at line 1030 of file DeclBase.h.
References getPreviousDeclImpl().
|
inlineprotectedvirtual |
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Reimplemented in clang::VarDecl, clang::FunctionDecl, clang::TypedefNameDecl, and clang::TagDecl.
Definition at line 960 of file DeclBase.h.
Referenced by getPreviousDecl().
|
inlinevirtual |
Source range that this declaration covers.
Reimplemented in clang::LabelDecl, clang::NamespaceDecl, clang::DeclaratorDecl, clang::VarDecl, clang::ParmVarDecl, clang::FunctionDecl, clang::FieldDecl, clang::EnumConstantDecl, clang::TypeDecl, clang::TypedefDecl, clang::TypeAliasDecl, clang::TagDecl, clang::EnumDecl, clang::FileScopeAsmDecl, clang::TopLevelStmtDecl, clang::BlockDecl, clang::ImportDecl, clang::ExportDecl, clang::HLSLBufferDecl, clang::AccessSpecDecl, clang::LinkageSpecDecl, clang::UsingDirectiveDecl, clang::NamespaceAliasDecl, clang::UsingDecl, clang::UsingEnumDecl, clang::UsingPackDecl, clang::UnresolvedUsingValueDecl, clang::StaticAssertDecl, clang::FriendDecl, clang::ObjCMethodDecl, clang::ObjCTypeParamDecl, clang::ObjCPropertyDecl, clang::ObjCContainerDecl, clang::ObjCInterfaceDecl, clang::ObjCProtocolDecl, clang::ObjCPropertyImplDecl, clang::OMPCapturedExprDecl, clang::TemplateDecl, clang::TemplateTypeParmDecl, clang::NonTypeTemplateParmDecl, clang::TemplateTemplateParmDecl, clang::BuiltinTemplateDecl, clang::ClassTemplateSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::VarTemplatePartialSpecializationDecl, and clang::ConceptDecl.
Definition at line 420 of file DeclBase.h.
References getLocation().
Referenced by clang::Sema::AddAlignValueAttr(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), ConvertDeducedTemplateArgument(), clang::Sema::DiagnoseMisalignedMembers(), clang::ODRDiagsEmitter::diagnoseMismatch(), diagnoseSubMismatchMethodParameters(), clang::Sema::EndOpenMPDSABlock(), clang::tooling::getAssociatedRange(), getBeginLoc(), clang::syntax::TreeBuilder::getDeclarationRange(), getEndLoc(), clang::TemplateDecl::getSourceRange(), handleOpenCLAccessAttr(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), and warnAboutAmbiguousFunction().
unsigned Decl::getTemplateDepth | ( | ) | const |
Determine the number of levels of template parameter surrounding this declaration.
Definition at line 274 of file DeclBase.cpp.
References getDeclContext(), getDescribedTemplateParams(), getFriendObjectKind(), and getLexicalDeclContext().
Referenced by clang::Sema::SubstSpaceshipAsEqualEqual().
TranslationUnitDecl * Decl::getTranslationUnitDecl | ( | ) |
Definition at line 413 of file DeclBase.cpp.
References getDeclContext(), clang::DeclContext::getParent(), and clang::DeclContext::isTranslationUnit().
Referenced by getASTContext(), getTranslationUnitDecl(), clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage(), and isAncestorDeclContextOf().
|
inline |
Definition at line 469 of file DeclBase.h.
References getTranslationUnitDecl().
VersionTuple Decl::getVersionIntroduced | ( | ) | const |
Retrieve the version of the target platform in which this declaration was introduced.
Definition at line 688 of file DeclBase.cpp.
References attrs(), getASTContext(), clang::TargetInfo::getPlatformName(), getRealizedPlatform(), and clang::ASTContext::getTargetInfo().
Referenced by DoEmitAvailabilityWarning().
|
inline |
Definition at line 560 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFinishNamespaceDef(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCExceptionDecl(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPAllocateDirective(), clang::Sema::ActOnOpenMPCall(), 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::ActOnTagFinishDefinition(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddCFAuditedAttribute(), clang::Sema::AddConversionCandidate(), clang::ASTRecordWriter::AddFunctionDefinition(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), clang::Sema::AddMethodCandidate(), clang::Sema::AddOptnoneAttributeIfNoConflicts(), clang::Sema::AddSectionMSAllocText(), addX86InterruptAttrs(), adjustGVALinkageForAttributes(), AllowOverloadingOfFunction(), clang::CodeGen::CodeGenModule::AlwaysHasLTOVisibilityPublic(), annotateConsumedSummaryMismatch(), applyOMPAllocateAttribute(), clang::Sema::AreMultipleMethodsInGlobalPool(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), assignInheritanceModel(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::Sema::AttachBaseSpecifiers(), basicGVALinkageForFunction(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildReturnStmt(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Sema::canCalleeThrow(), canRedefineFunction(), captureInBlock(), clang::Sema::checkAllowedCUDAInitializer(), clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompletedCoroutineBody(), clang::Sema::CheckCompleteVariableDeclaration(), checkForIBOutlets(), CheckForModifiableLvalue(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckHLSLEntryPoint(), clang::Sema::CheckMain(), clang::Sema::CheckMessageArgumentTypes(), CheckMoveOnConstruction(), CheckMultiVersionAdditionalDecl(), CheckNakedParmReference(), CheckNonNullArguments(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::checkOpenMPDeclareVariantFunction(), clang::Sema::CheckOverrideControl(), checkPreviousOMPAllocateAttribute(), CheckProtocolMethodDefs(), checkRecordDeclForAttr(), clang::Sema::CheckStaticLocalForDllExport(), clang::Sema::CheckTransparentUnionArgumentConstraints(), checkTypedefTypeForCapability(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CheckVirtualDtorCall(), compareEnableIfAttrs(), computeKeyFunction(), clang::LinkageComputer::computeLVForDecl(), configureBlocksRuntimeObject(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::Sema::CreatePropertyDecl(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::Sema::CUDACheckLambdaCapture(), clang::Sema::CUDASetLambdaAttrs(), CXXRecordAllNonInlineVirtualsHaveAttr(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), clang::DeclAttrsMatchCUDAMode(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseAssignmentEnum(), diagnoseNoescape(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), DiagnoseUninitializedUse(), clang::Sema::DiagnoseUnusedButSetDecl(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), EmitAutoVarWithLifetime(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), EmitDirectCallee(), clang::CodeGen::CGDebugInfo::EmitExternalVariable(), clang::CodeGen::CGDebugInfo::EmitFuncDeclForCallSite(), EmitFunctionDeclPointer(), clang::CodeGen::CGDebugInfo::emitFunctionStart(), clang::CodeGen::CodeGenModule::EmitGlobal(), clang::CodeGen::CGDebugInfo::EmitGlobalAlias(), EmitGlobalVarDeclLValue(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CGHLSLRuntime::emitInputSemantic(), clang::CodeGen::CGDebugInfo::EmitLabel(), EvaluateUnaryTypeTrait(), clang::Sema::FinalizeDeclaration(), findProtocolsWithExplicitImpls(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::ASTContext::getBlockVarCopyInit(), clang::CodeGen::CodeGenModule::getBuiltinLibFunction(), getCallingConventionForDecl(), clang::ASTContext::getDeclAlign(), getDeclAlignIfRequired(), clang::CXXMethodDecl::getDevirtualizedMethod(), clang::getDLLAttr(), clang::Sema::getEmissionStatus(), clang::ento::retaincountchecker::RefLeakReportVisitor::getEndPath(), GetFullTypeForDeclarator(), clang::CodeGen::CodeGenModule::GetGlobalVarAddressSpace(), clang::Sema::getImplicitCodeSegOrSectionAttrForFunction(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), clang::LinkageComputer::getLVForDecl(), clang::Sema::getNamedReturnInfo(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::index::getSymbolInfo(), getTypeInfoLinkage(), clang::Sema::getUndefinedButUsed(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::GlobalDecl::GlobalDecl(), handleCallbackAttr(), clang::CodeGen::CodeGenModule::HandleCXXStaticMemberVarInstantiation(), handleDelayedForbiddenType(), handleGslAnnotatedTypes(), handleManagedAttr(), handleNoBuiltinAttr(), handleNoRandomizeLayoutAttr(), handleOpenCLAccessAttr(), handlePassObjectSizeAttr(), handleRandomizeLayoutAttr(), clang::CodeGen::CGOpenMPRuntime::hasAllocateAttributeForGlobalVar(), clang::CodeGen::CGOpenMPRuntimeGPU::hasAllocateAttributeForGlobalVar(), hasDirectVisibilityAttribute(), clang::CodeGen::CodeGenModule::HasHiddenLTOVisibility(), hasObjCExceptionAttribute(), clang::Expr::HasSideEffects(), clang::Sema::IdentifyCUDATarget(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::InitializedEntity::InitializeParameter(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateClassMembers(), clang::Sema::InstantiateVariableInitializer(), isAllocatableDecl(), IsArgumentMaybeUndef(), isBetterMultiversionCandidate(), isBlockVarRef(), isClassOrMethodDLLImport(), clang::CodeGen::CGCXXABI::isEmittedWithConstantInitializer(), isEmptyField(), isFunctionDefinitionDiscarded(), clang::Type::isIncompleteType(), isInMIGCall(), isNoexcept(), clang::Sema::isOpenMPCapturedByRef(), IsPreserveAIArrayBase(), isRecordWithAttr(), isTestingFunction(), isTransparentUnion(), IsTransparentUnionStandardConversion(), isVarDeclStrongDefinition(), isVariableCapturable(), isVirtualCall(), clang::Sema::makeUnavailableInSystemHeader(), markEscapingByrefs(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MatchTwoMethodDeclarations(), clang::Sema::MaybeAddCUDAConstantAttr(), clang::Sema::maybeAddCUDAHostDeviceAttrs(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mayExternalize(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeDeclAttributes(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::MergeFunctionDecl(), clang::ASTDeclReader::mergeInheritableAttributes(), mergeInterfaceMethodToImpl(), clang::Sema::mergeMinSizeAttr(), mergeObjCDirectMembers(), clang::Sema::mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), clang::ASTContext::mergeTransparentUnionType(), clang::Sema::MergeVarDecl(), clang::Sema::NoteOverloadCandidate(), noteOverloads(), clang::ASTContext::ObjCMethodsAreEqual(), clang::InitializationSequence::Perform(), clang::Sema::ProcessDeclAttributeDelayed(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), pushTemporaryCleanup(), RecordModifiableNonNullParam(), recordUsesEBO(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::CodeGen::SanitizerMetadata::reportGlobal(), requiresAMDGPUProtectedVisibility(), clang::ASTContext::setBlockVarCopyInit(), clang::CodeGen::CodeGenModule::SetCommonAttributes(), setCUDAKernelCallingConvention(), clang::CodeGen::CodeGenModule::setDLLImportDLLExport(), setLinkageForGV(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), clang::CodeGen::CodeGenModule::setLLVMFunctionFEnvAttributes(), clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(), shouldBeInCOMDAT(), shouldConsiderTemplateVisibility(), ShouldDiagnoseSwitchCaseNotInEnum(), ShouldDiagnoseUnusedDecl(), shouldEscapeRegion(), shouldExtendReceiverForInnerPointerMessage(), clang::ASTContext::shouldExternalize(), clang::MangleContext::shouldMangleDeclName(), clang::CXXNewExpr::shouldNullCheckAllocation(), shouldOmitDefinition(), ShouldUseExternalRTTIDescriptor(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), SuggestInitializationFixit(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), clang::Sema::updateAttrsForLateParsedTemplate(), useFirstFieldIfTransparentUnion(), useInlineVisibilityHidden(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ento::SValExplainer::VisitNonParamVarRegion(), clang::ASTDeclWriter::VisitVarDecl(), clang::ASTDeclReader::VisitVarDeclImpl(), and clang::Sema::WarnExactTypedMethods().
|
inline |
Definition at line 502 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(), addAttr(), attr_begin(), attr_end(), AttributesMatch(), clang::Sema::BuildReturnStmt(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckFieldDecl(), checkNewAttributesAfterDef(), clang::Sema::CheckVariableDeclarationType(), createPrivatesRecordDecl(), clang::CodeGen::CGHLSLRuntime::emitInputSemantic(), clang::Sema::EndOpenMPDSABlock(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), getAttr(), getMaxAlignment(), hasAttr(), hasAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), RedeclarePropertyAccessor(), 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 1058 of file DeclBase.h.
References getBody().
Referenced by clang::CloneDetector::analyzeCodeBody(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), emitDiagnostics(), emitOutlinedFunctionPrologue(), hasImplicitBody(), clang::CallGraph::includeInGraph(), and clang::ento::CheckerManager::runCheckersOnASTBody().
|
inlineprotected |
Definition at line 414 of file DeclBase.h.
References CacheValidAndLinkage.
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 515 of file DeclBase.cpp.
Referenced by clang::FunctionDecl::isThisDeclarationADefinition(), and clang::VarDecl::isThisDeclarationADefinition().
|
protected |
Definition at line 119 of file DeclBase.cpp.
References getASTContext(), clang::ASTContext::getLangOpts(), and clang::LangOptions::trackLocalOwningModule().
Referenced by getLocalOwningModule(), setLocalOwningModule(), and setModuleOwnershipKind().
|
inline |
Is this declaration owned by some module?
Definition at line 803 of file DeclBase.h.
References getModuleOwnershipKind(), and Unowned.
Referenced by clang::Sema::ActOnFunctionDeclarator(), getImportedOwningModule(), getLocalOwningModule(), setLexicalDeclContext(), and setLocalOwningModule().
|
inline |
Definition at line 864 of file DeclBase.h.
References getIdentifierNamespace(), and isTagIdentifierNamespace().
|
inline |
Whether this particular Decl is a canonical one.
Definition at line 949 of file DeclBase.h.
References getCanonicalDecl().
Referenced by clang::index::FileIndexRecord::addDeclOccurence(), clang::CXXMethodDecl::addOverriddenMethod(), clang::ASTContext::addOverriddenMethod(), clang::ClassTemplateDecl::AddPartialSpecialization(), clang::VarTemplateDecl::AddPartialSpecialization(), clang::RedeclarableTemplateDecl::addSpecializationImpl(), checkMappableExpressionList(), clang::NamedDecl::declarationReplaces(), clang::ASTDumper::dumpTemplateDecl(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), getCanonicalDecl(), clang::ASTContext::getSubstTemplateTypeParmPackType(), clang::ASTDeclWriter::VisitClassTemplateSpecializationDecl(), clang::ASTDeclReader::VisitClassTemplateSpecializationDeclImpl(), clang::ASTDeclReader::VisitCXXMethodDecl(), clang::ASTDeclWriter::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 914 of file DeclBase.h.
References getParentFunctionOrMethod().
Referenced by clang::Sema::InstantiateClass(), clang::Sema::LookupIvarInObjCMethod(), LookupPotentialTypoResult(), clang::extractapi::ExtractAPIVisitor::VisitTypedefNameDecl(), and clang::extractapi::ExtractAPIVisitor::VisitVarDecl().
|
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 720 of file DeclBase.h.
References clang::AR_Deprecated, and getAvailability().
Referenced by clang::TypoCorrectionConsumer::addCorrection(), and clang::Sema::addMethodToGlobalList().
|
inline |
FIXME: Implement discarding declarations actually in global module fragment.
See [module.global.frag]p3,4 for details.
Definition at line 649 of file DeclBase.h.
bool Decl::isFileContextDecl | ( | ) | const |
Definition at line 408 of file DeclBase.cpp.
Referenced by clang::Sema::getTemplateInstantiationArgs().
|
inline |
True if this is the first declaration in its redeclaration chain.
Definition at line 1035 of file DeclBase.h.
References getPreviousDecl().
|
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 751 of file DeclBase.h.
References FromASTFile.
Referenced by clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), compareDeclarations(), clang::NamedDecl::declarationReplaces(), clang::ASTReader::forEachImportedKeyDecl(), getDeclForLocalLookup(), getDeclForMerging(), clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), getGlobalID(), getImportedOwningModule(), clang::ASTReader::getKeyDeclaration(), getLocalOwningModule(), getOwningModule(), clang::ASTReader::getOwningModuleFile(), getOwningModuleID(), clang::Sema::InstantiateFunctionDefinition(), isDefinedInClangModule(), isImportedDeclContext(), clang::ASTWriter::IsLocalDecl(), clang::ASTDeclWriter::RegisterTemplateSpecialization(), clang::StoredDeclsList::removeExternalDecls(), clang::StoredDeclsList::replaceExternalDecls(), setLexicalDeclContext(), setLocalOwningModule(), setModuleOwnershipKind(), setOwningModuleID(), and clang::TextNodeDumper::Visit().
|
inline |
Whether this declaration is a function or function template.
Definition at line 1084 of file DeclBase.h.
bool Decl::isFunctionPointerType | ( | ) | const |
Definition at line 1051 of file DeclBase.cpp.
References clang::QualType::getCanonicalType(), and clang::Type::isFunctionPointerType().
|
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 576 of file DeclBase.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFinishFunctionBody(), clang::CXXRecordDecl::addedEligibleSpecialMemberFunction(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::Sema::BuildCXXNew(), clang::Sema::buildOverloadedCallSet(), clang::Sema::BuildResolvedCallExpr(), checkDLLAttributeRedeclaration(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::checkInitializerLifetime(), clang::Sema::CheckObjCMethodOverrides(), clang::Sema::DeclareImplicitDeductionGuides(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), DiagnoseBadTarget(), diagnoseDeprecatedCopyOperation(), DiagnoseFailedExplicitSpec(), clang::CodeGen::CGDebugInfo::EmitFunctionDecl(), clang::CodeGen::CGDebugInfo::emitFunctionStart(), clang::Sema::FindAllocationFunctions(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::BodyFarm::getBody(), clang::ASTContext::getBuiltinVaListDecl(), getDeclLocForCommentSearch(), clang::CXXRecordDecl::getLambdaExplicitTemplateParameters(), getNonCLikeKindForAnonymousStruct(), clang::ObjCMethodDecl::getNumSelectorLocs(), clang::ObjCMethodDecl::getSelectorStartLoc(), clang::Sema::HandleExprPropertyRefExpr(), hasImplicitAttr(), hasImplicitBody(), clang::Sema::IdentifyCUDATarget(), clang::Sema::ImplicitlyDefineFunction(), clang::index::IndexingContext::importedModule(), clang::index::IndexingContext::indexDecl(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::FunctionTemplateDecl::isAbbreviated(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::ObjCInterfaceDecl::isImplicitInterfaceDecl(), clang::RecordDecl::isInjectedClassName(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), clang::diff::isSpecializedNodeExcluded(), clang::ODRHash::isSubDeclToBeProcessed(), isTrackedVar(), LeastDerivedClassWithSameLayout(), clang::ObjCInterfaceDecl::lookupMethod(), mergeDeclAttribute(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::NoteDeletedFunction(), NoteFunctionCandidate(), RedeclarePropertyAccessor(), RedeclForcesDefC99(), clang::ObjCMethodDecl::setMethodParams(), clang::Sema::ShouldDeleteSpecialMember(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::Sema::UseArgumentDependentLookup(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::Sema::warnOnReservedIdentifier().
bool Decl::isInAnonymousNamespace | ( | ) | const |
Definition at line 393 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::getParent().
Referenced by getOwningModuleForLinkage(), and clang::ASTNodeImporter::hasSameVisibilityContextAndLinkage().
bool Decl::isInExportDeclContext | ( | ) | const |
Whether this declaration was exported in a lexical context.
e.g.:
export namespace A { void f1(); // isInExportDeclContext() == true } void A::f1(); // isInExportDeclContext() == false
namespace B { void f2(); // isInExportDeclContext() == false } export void B::f2(); // isInExportDeclContext() == true
Definition at line 1016 of file DeclBase.cpp.
References getLexicalDeclContext(), and clang::DeclContext::getLexicalParent().
Referenced by clang::Sema::ActOnStartLinkageSpecification(), clang::Sema::ArgumentDependentLookup(), and clang::Sema::CheckRedeclarationExported().
Definition at line 858 of file DeclBase.h.
References getIdentifierNamespace().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::DiagnoseAmbiguousLookup(), clang::LookupResult::getAcceptableDecl(), isOrdinaryMember(), clang::Sema::LookupQualifiedName(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionTemplateDecl(), clang::ASTNodeImporter::VisitNamespaceDecl(), clang::ASTNodeImporter::VisitObjCInterfaceDecl(), clang::ASTNodeImporter::VisitObjCProtocolDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypeAliasTemplateDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::ASTNodeImporter::VisitVarTemplateDecl().
bool Decl::isInLocalScopeForInstantiation | ( | ) | const |
Determine whether a substitution into this declaration would occur as part of a substitution into a dependent local scope.
Such a substitution transitively substitutes into all constructs nested within this declaration.
This recognizes non-defining declarations as well as members of local classes and lambdas:
Definition at line 376 of file DeclBase.cpp.
References getLexicalDeclContext(), clang::DeclContext::getLexicalParent(), clang::DeclContext::isDependentContext(), and clang::DeclContext::isFunctionOrMethod().
Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
bool Decl::isInStdNamespace | ( | ) | const |
Definition at line 403 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::isStdNamespace().
Referenced by clang::Sema::ActOnFunctionDeclarator(), getInnerPointerType(), clang::FunctionDecl::getMemoryFunctionKind(), IsDeclSourceLocationCurrent(), clang::FunctionDecl::isDestroyingOperatorDelete(), clang::Type::isNothrowT(), IsStdFunction(), IsStdString(), and shouldTrackFirstArgument().
|
inline |
Definition at line 571 of file DeclBase.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnCXXExitDeclInitializer(), clang::Sema::ActOnCXXForRangeStmt(), clang::Sema::ActOnCXXTryBlock(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishDelayedCXXMethodDeclaration(), clang::Sema::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(), clang::Sema::ActOnFinishExportDecl(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnLambdaExpressionAfterIntroducer(), clang::Sema::ActOnObjCAtCatchStmt(), clang::Sema::ActOnObjCForCollectionStmt(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), adjustDeclContextForDeclaratorDecl(), AnalyzeBitFieldAssignment(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildCaptureField(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildDeclaratorGroup(), buildDeclareReductionRef(), clang::Sema::BuildIvarRefExpr(), clang::Sema::BuildLambdaExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildReturnStmt(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVarTemplateInstantiation(), canPassInRegisters(), CastToDerivedClass(), clang::Sema::checkAllowedCUDAInitializer(), checkARCPropertyImpl(), CheckArityMismatch(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompletedCoroutineBody(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckCXXDefaultArguments(), CheckDeclInExpr(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkDLLAttributeRedeclaration(), clang::Sema::CheckFieldDecl(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), clang::Sema::CheckMSVCRTEntryPoint(), CheckMultiVersionAdditionalDecl(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverrideControl(), checkPropertyDeclWithOwnership(), clang::Sema::CheckPureMethod(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTemplateTemplateArgument(), clang::Sema::CheckVariableDeclaration(), clang::Sema::CheckVariableDeclarationType(), ComputeDefaultedComparisonExceptionSpec(), ComputeDefaultedSpecialMemberExceptionSpec(), clang::Sema::DeclareImplicitDeductionGuides(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::DeduceVariableDeclarationType(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), DelegatingCycleHelper(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseHiddenVirtualMethods(), diagnoseOpenCLTypes(), DiagnoseReinterpretUpDownCast(), clang::Sema::DiagnoseUnimplementedProperties(), clang::Sema::DiagnoseUninstantiableTemplate(), DoMarkBindingDeclReferenced(), DoMarkVarDeclReferenced(), clang::Sema::EndOpenMPDSABlock(), EvaluateVarDecl(), clang::Sema::FinalizeVarWithDestructor(), findCompleteObject(), clang::Sema::findInheritingConstructor(), clang::Sema::FindInstantiatedDecl(), clang::ASTContext::getASTRecordLayout(), clang::ASTContext::getCommentForDecl(), clang::Sema::getConstructorName(), getContainedDynamicClass(), getNonCLikeKindForAnonymousStruct(), clang::ASTContext::getPreferredTypeAlign(), clang::Sema::getUndefinedButUsed(), HandleClassZeroInitialization(), HandleConstructorCall(), clang::Sema::HandleField(), HandleLValueBase(), HandleLValueDirectBase(), HandleLValueMember(), clang::Sema::HandleMSProperty(), handleNoEscapeAttr(), handleOpenCLAccessAttr(), handleSwiftError(), clang::index::IndexingContext::importedModule(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateMemInitializers(), clang::Sema::InstantiateVariableDefinition(), isBetterMultiversionCandidate(), clang::Sema::IsDerivedFrom(), clang::FunctionDecl::isImplicitlyInstantiable(), clang::FieldDecl::isZeroSize(), clang::Sema::LookupLiteralOperator(), LookupMemberExpr(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkVirtualBaseDestructorsReferenced(), 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::ProcessPropertyDecl(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::LookupResult::resolveKind(), clang::Sema::SetDeclDefaulted(), clang::Sema::setTagNameForLinkagePurposes(), shouldBeHidden(), clang::Sema::ShouldDeleteSpecialMember(), ShouldDiagnoseUnusedDecl(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::TreeTransform< Derived >::SkipLambdaBody(), clang::Sema::SubstDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), TryRefInitWithConversionFunction(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::interp::ByteCodeExprGen< Emitter >::visitDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclReader::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
|
inline |
Definition at line 643 of file DeclBase.h.
References getModuleOwnershipKind(), and VisibleWhenImported.
|
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 1134 of file DeclBase.h.
References IDNS_LocalExtern.
Referenced by clang::Sema::BuildVariableInstantiation(), clang::Sema::canFullyTypeCheckRedeclaration(), checkDLLAttributeRedeclaration(), clang::Sema::FilterUsingLookup(), clang::Sema::HandleDelayedAccessCheck(), isTemplated(), clang::Sema::MergeCXXFunctionDecl(), shouldBeHidden(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
inline |
Whether this declaration was marked as being private to the module in which it was defined.
Definition at line 625 of file DeclBase.h.
References getModuleOwnershipKind(), and ModulePrivate.
|
virtual |
Determine whether this declaration is declared out of line (outside its semantic context).
Reimplemented in clang::VarDecl, and clang::FunctionDecl.
Definition at line 100 of file Decl.cpp.
References clang::DeclContext::Equals(), getDeclContext(), and getLexicalDeclContext().
Referenced by clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnCXXExitDeclInitializer(), diagnoseBadDirectAccess(), 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 220 of file DeclBase.cpp.
References isTemplateParameterPack().
Referenced by clang::Sema::ActOnConceptDefinition(), clang::Sema::ActOnLambdaExpressionAfterIntroducer(), clang::Sema::ActOnSizeofParameterPackExpr(), clang::computeDependence(), ConvertDeducedTemplateArguments(), isSameAsPrimaryTemplate(), and MatchTemplateParameterKind().
|
inline |
Definition at line 828 of file DeclBase.h.
References getModuleOwnershipKind(), int, and ReachableWhenImported.
bool Decl::isReferenced | ( | ) | const |
Whether any declaration of this entity was referenced.
Definition at line 482 of file DeclBase.cpp.
References redecls().
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::BuildVariableInstantiation(), clang::Sema::DiagnoseUnusedBackingIvarInAccessor(), clang::Sema::DiagnoseUnusedButSetDecl(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), 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 868 of file DeclBase.h.
References IDNS_Tag, IDNS_TagFriend, and IDNS_Type.
Referenced by hasTagIdentifierNamespace().
bool Decl::isTemplated | ( | ) | const |
Determine whether this declaration is a templated entity (whether it is.
Definition at line 262 of file DeclBase.cpp.
References getDeclContext(), getDescribedTemplateParams(), getFriendObjectKind(), getLexicalDeclContext(), isLocalExternDecl(), and isTemplateDecl().
Referenced by clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::AddInitializerToDecl(), clang::Sema::CheckFunctionDeclaration(), and clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
bool Decl::isTemplateDecl | ( | ) | const |
returns true if this declaration is a template
Definition at line 235 of file DeclBase.cpp.
Referenced by isTemplated().
|
inline |
isTemplateParameter - Determines whether this declaration is a template parameter.
Definition at line 2615 of file DeclBase.h.
References getKind().
Referenced by clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnNamespaceAliasDef(), clang::Sema::ActOnParamDeclarator(), clang::Sema::CheckClassTemplate(), clang::Sema::DiagnoseTemplateParameterShadow(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), clang::NamedDecl::isReserved(), maybeDiagnoseTemplateParameterShadow(), shouldBeHidden(), and clang::ASTDeclReader::VisitDecl().
bool Decl::isTemplateParameterPack | ( | ) | const |
isTemplateParameter - Determines whether this declaration is a template parameter pack.
Definition at line 210 of file DeclBase.cpp.
Referenced by checkLiteralOperatorTemplateParameterList(), ConvertDeducedTemplateArguments(), clang::ASTContext::getInjectedTemplateArg(), isParameterPack(), clang::Sema::LookupLiteralOperator(), MatchTemplateParameterKind(), and clang::ASTDeclReader::VisitDecl().
|
inline |
Whether this declaration was referenced.
This should not be relied upon for anything other than debugging.
Definition at line 604 of file DeclBase.h.
Referenced by clang::JSONNodeDumper::Visit(), and clang::TextNodeDumper::Visit().
|
inline |
Whether this declaration is a top-level declaration (function, global variable, etc.) that is lexically inside an objc container definition.
Definition at line 611 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 729 of file DeclBase.h.
References clang::AR_Unavailable, and getAvailability().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::addMethodToGlobalList(), clang::Sema::DefaultSynthesizeProperties(), and clang::Sema::DiagnoseMissingDesignatedInitOverrides().
|
inline |
Determine whether this declaration is definitely visible to name lookup, independent of whether the owning module is visible.
Note: The declaration may be visible even if this returns false
if the owning module is visible within the query context. This is a low-level helper function; most code should be calling Sema::isVisible() instead.
Definition at line 824 of file DeclBase.h.
References getModuleOwnershipKind(), int, and Visible.
Referenced by clang::Sema::isReachable(), clang::LookupResult::isReachable(), clang::Sema::isVisible(), clang::LookupResult::isVisible(), clang::ObjCProtocolDecl::lookupMethod(), clang::Sema::MatchTwoMethodDeclarations(), clang::ASTReader::mergeDefinitionVisibility(), NestedProtocolHasNoDefinition(), and setVisibleDespiteOwningModule().
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 457 of file DeclBase.cpp.
References getCanonicalDecl(), and getMostRecentDecl().
Referenced by clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnPragmaUnused(), clang::Sema::BuildVariableInstantiation(), checkDLLAttributeRedeclaration(), CheckMultiVersionAdditionalRules(), CheckMultiVersionFunction(), clang::Sema::checkOpenMPDeclareVariantFunction(), clang::CodeGen::CodeGenModule::EmitOMPDeclareMapper(), clang::CodeGen::CodeGenModule::EmitOMPDeclareReduction(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkFunctionReferenced(), markUsed(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::mergeDeclAttributes(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDecl(), ShouldDiagnoseUnusedDecl(), ShouldRemoveFromUnused(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::updateFlags(), clang::JSONNodeDumper::Visit(), clang::TextNodeDumper::Visit(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), and clang::ASTDeclWriter::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 731 of file DeclBase.cpp.
References clang::AR_NotYetIntroduced, attrs(), canBeWeakImported(), CheckAvailability(), getASTContext(), and getMostRecentDecl().
Referenced by clang::ValueDecl::isWeak(), and setLinkageForGV().
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 472 of file DeclBase.cpp.
References clang::C, isUsed(), and setIsUsed().
Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnGotoStmt(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCXXForRangeStmt(), buildDeclRefExpr(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::MarkFunctionReferenced(), and clang::ASTDeclReader::UpdateDecl().
|
protected |
Allocate memory for a non-deserialized declaration.
Definition at line 93 of file DeclBase.cpp.
References Parent.
|
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 73 of file DeclBase.cpp.
References clang::ASTContext::Allocate(), and clang::Result.
void Decl::print | ( | raw_ostream & | Out, |
const PrintingPolicy & | Policy, | ||
unsigned | Indentation = 0 , |
||
bool | PrintInstantiation = false |
||
) | const |
Definition at line 131 of file DeclPrinter.cpp.
References getASTContext().
void Decl::print | ( | raw_ostream & | Out, |
unsigned | Indentation = 0 , |
||
bool | PrintInstantiation = false |
||
) | const |
Definition at line 126 of file DeclPrinter.cpp.
References getASTContext(), and print().
Referenced by formatTemplateParameterPlaceholder(), print(), and printMemFnName().
|
static |
Definition at line 188 of file DeclPrinter.cpp.
References Begin, clang::PrintingPolicy::IncludeTagDefinition, and clang::PrintingPolicy::SuppressSpecifiers.
|
static |
Definition at line 178 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 1014 of file DeclBase.h.
References redecls_begin(), and redecls_end().
Referenced by clang::extractapi::AvailabilitySet::AvailabilitySet(), compareDeclarations(), clang::NamedDecl::declarationReplaces(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), findAcceptableDecl(), findDefiningRedecl(), clang::LinkageComputer::getLVForDecl(), clang::ASTContext::getRawCommentForAnyRedecl(), handleLifetimeCategoryAttr(), hasAcceptableDeclarationImpl(), and isReferenced().
|
inline |
Definition at line 1018 of file DeclBase.h.
Referenced by redecls().
|
inline |
Definition at line 1022 of file DeclBase.h.
Referenced by redecls().
|
inline |
Definition at line 486 of file DeclBase.h.
References Access.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnOpenMPAllocateDirective(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingEnumDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::CompleteLambdaCallOperator(), clang::Sema::CreateLambdaCallOperator(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::findInheritingConstructor(), clang::Sema::HandleMSProperty(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), InjectAnonymousStructOrUnionMembers(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::UnresolvedSetImpl::setAccess(), setInvalidDecl(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::SubstSpaceshipAsEqualEqual(), 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::VisitTypeAliasTemplateDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitUnresolvedUsingTypenameDecl(), clang::ASTNodeImporter::VisitUnresolvedUsingValueDecl(), clang::ASTNodeImporter::VisitUsingShadowDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
|
inline |
Definition at line 504 of file DeclBase.h.
References getASTContext().
Referenced by addAttr(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), and RedeclarePropertyAccessor().
|
inlineprotected |
Definition at line 410 of file DeclBase.h.
References CacheValidAndLinkage.
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 336 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnOpenMPDeclareMapperDirective(), adjustDeclContextForDeclaratorDecl(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::DeclApplyPragmaWeak(), clang::ParmVarDecl::setOwningFunction(), clang::Sema::SubstParmVarDecl(), clang::ASTDeclReader::VisitDecl(), and clang::ASTNodeImporter::VisitTypedefNameDecl().
|
inline |
Set the FromASTFile flag.
This indicates that this declaration was deserialized and not parsed from source code and enables features such as module ownership information.
Definition at line 673 of file DeclBase.h.
References FromASTFile.
Definition at line 577 of file DeclBase.h.
Referenced by clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::BuildAnonymousStructOrUnion(), clang::ASTContext::buildImplicitRecord(), clang::ASTContext::buildImplicitTypedef(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildParmVarDeclForTypedef(), buildVarDecl(), CreateAAPCSABIBuiltinVaListDecl(), clang::Sema::CreateBuiltin(), clang::Sema::CreateCapturedStmtRecordDecl(), 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::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::HLSLExternalSemaSource::InitializeSema(), InjectAnonymousStructOrUnionMembers(), InsertOCLBuiltinDeclarationsFromTable(), InventTemplateParameter(), 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 132 of file DeclBase.cpp.
References clang::AS_public, clang::Invalid, and setAccess().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnConceptDefinition(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnOpenMPFirstprivateClause(), 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::ActOnStartExportDecl(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagDefinitionError(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildCaptureField(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingEnumDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::checkAllowedCUDAInitializer(), checkAttributesAfterMerging(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCoroutineBody(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::checkCUDATargetOverload(), clang::Sema::CheckCXXDefaultArgExpr(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedFunction(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckForFunctionRedefinition(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckHLSLEntryPoint(), clang::Sema::CheckInheritingConstructorUsingDecl(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMSVCRTEntryPoint(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionFirstFunction(), CheckMultiVersionFunction(), checkNewAttributesAfterDef(), clang::Sema::CheckObjCDeclScope(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverload(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckParameter(), clang::Sema::CheckRedeclarationModuleOwnership(), CheckTargetCausesMultiVersioning(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::checkVarDeclRedefinition(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CheckVarTemplateId(), clang::ConceptDecl::Create(), clang::FunctionTemplateDecl::Create(), clang::ClassTemplateDecl::Create(), clang::TypeAliasTemplateDecl::Create(), clang::VarTemplateDecl::Create(), CreateNewFunctionDecl(), clang::Sema::CreatePropertyDecl(), clang::Sema::DeduceVariableDeclarationType(), clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), DiagnoseInvalidRedeclaration(), diagnoseOpenCLTypes(), clang::Sema::DiagnoseUninstantiableTemplate(), diagnoseVarDeclTypeMismatch(), clang::Sema::FinalizeDeclaration(), clang::Sema::findInheritingConstructor(), FinishForRangeVarDecl(), GetFullTypeForDeclarator(), getPatternForClassTemplateSpecialization(), handleOpenCLAccessAttr(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), 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::SetDeclDefaulted(), clang::Sema::SetDeclDeleted(), clang::Sema::SubstBaseSpecifiers(), clang::Sema::SubstDefaultArgument(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
|
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 591 of file DeclBase.h.
References getCanonicalDecl().
Referenced by clang::Sema::BuildVariableInstantiation(), markUsed(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::MergeVarDecl(), and clang::updateFlags().
void Decl::setLexicalDeclContext | ( | DeclContext * | DC | ) |
Definition at line 340 of file DeclBase.cpp.
References getASTContext(), getDeclContext(), getLexicalDeclContext(), getModuleOwnershipKind(), getOwningModule(), hasOwningModule(), isFromASTFile(), setLocalOwningModule(), setModuleOwnershipKind(), and VisibleWhenImported.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnLambdaExpressionAfterIntroducer(), clang::Sema::ActOnOpenMPDeclareMapperDirective(), clang::Sema::ActOnProperty(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::ObjCImplDecl::addClassMethod(), clang::ObjCImplDecl::addInstanceMethod(), adjustDeclContextForDeclaratorDecl(), clang::Sema::BuildLambdaExpr(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckImplementationIvars(), clang::Sema::CheckTemplateIdType(), clang::Sema::CompleteLambdaCallOperator(), clang::Sema::CreatePropertyDecl(), clang::Sema::DeclApplyPragmaWeak(), RedeclarePropertyAccessor(), clang::ASTNodeImporter::VisitAccessSpecDecl(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitEmptyDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitLabelDecl(), clang::ASTNodeImporter::VisitLifetimeExtendedTemporaryDecl(), clang::ASTNodeImporter::VisitLinkageSpecDecl(), clang::ASTNodeImporter::VisitNamespaceAliasDecl(), clang::ASTNodeImporter::VisitNamespaceDecl(), clang::ASTNodeImporter::VisitObjCCategoryDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCInterfaceDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitObjCProtocolDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitStaticAssertDecl(), clang::ASTNodeImporter::VisitTypeAliasTemplateDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitUnresolvedUsingTypenameDecl(), clang::ASTNodeImporter::VisitUnresolvedUsingValueDecl(), clang::ASTNodeImporter::VisitUsingDecl(), clang::ASTNodeImporter::VisitUsingDirectiveDecl(), clang::ASTNodeImporter::VisitUsingEnumDecl(), clang::ASTNodeImporter::VisitUsingShadowDecl(), 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 1116 of file DeclBase.h.
References getIdentifierNamespace(), getPreviousDecl(), IDNS_LocalExtern, IDNS_Ordinary, IDNS_OrdinaryFriend, and IDNS_Tag.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildVariableInstantiation(), and clang::ASTDeclReader::VisitVarDeclImpl().
|
inline |
Definition at line 795 of file DeclBase.h.
References hasLocalOwningModuleStorage(), hasOwningModule(), and isFromASTFile().
Referenced by clang::Sema::ActOnStartLinkageSpecification(), clang::Sema::CheckRedeclarationModuleOwnership(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareGlobalNewDelete(), and setLexicalDeclContext().
|
inline |
Definition at line 433 of file DeclBase.h.
Referenced by clang::Sema::ActOnLabelStmt(), clang::Sema::CompleteLambdaCallOperator(), clang::Sema::InstantiateClass(), 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 846 of file DeclBase.h.
References getModuleOwnershipKind(), hasLocalOwningModuleStorage(), isFromASTFile(), NextInContextAndBits, and Unowned.
Referenced by clang::Sema::ActOnFinishNamespaceDef(), clang::Sema::ActOnGlobalModuleFragmentDecl(), clang::Sema::ActOnModuleDecl(), clang::Sema::ActOnPrivateModuleFragmentDecl(), clang::Sema::ActOnStartExportDecl(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareGlobalNewDelete(), setLexicalDeclContext(), setModulePrivate(), setVisibleDespiteOwningModule(), 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 661 of file DeclBase.h.
References getModuleOwnershipKind(), ModulePrivate, setModuleOwnershipKind(), and Unowned.
|
inline |
Specifies that this declaration is a C++ overloaded non-member.
Definition at line 1194 of file DeclBase.h.
References getKind(), IDNS_NonMemberOperator, and IDNS_Ordinary.
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 1145 of file DeclBase.h.
References getIdentifierNamespace(), getPreviousDecl(), IDNS_LocalExtern, IDNS_NonMemberOperator, IDNS_Ordinary, IDNS_OrdinaryFriend, IDNS_Tag, IDNS_TagFriend, and IDNS_Type.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), clang::Sema::CheckClassTemplate(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::ASTNodeImporter::VisitFriendDecl().
|
inline |
Set the owning module ID.
This may only be called for deserialized Decls.
Definition at line 679 of file DeclBase.h.
References isFromASTFile().
Referenced by clang::ASTDeclReader::VisitDecl().
Definition at line 606 of file DeclBase.h.
Referenced by clang::Sema::BuildBlockForLambdaConversion(), buildDeclRefExpr(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), DoMarkBindingDeclReferenced(), DoMarkVarDeclReferenced(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::MarkAnyDeclReferenced(), clang::Sema::MarkFunctionReferenced(), and clang::ASTDeclReader::VisitDecl().
Definition at line 615 of file DeclBase.h.
References V.
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 835 of file DeclBase.h.
References isUnconditionallyVisible(), setModuleOwnershipKind(), and Visible.
Referenced by clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::hasAcceptableDefinition(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateVariableDefinition(), clang::Sema::makeMergedDefinitionVisible(), clang::ASTReader::mergeDefinitionVisibility(), and clang::ASTDeclReader::VisitDecl().
|
inline |
Definition at line 547 of file DeclBase.h.
References attr_begin().
Referenced by clang::Sema::IsOverload().
|
inline |
Definition at line 552 of file DeclBase.h.
References attr_end().
Referenced by clang::Sema::IsOverload().
|
inline |
Definition at line 542 of file DeclBase.h.
Referenced by clang::Sema::ActOnOpenMPCall(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), AttrFilter(), clang::Sema::CheckAlignasUnderalignment(), CheckNonNullArguments(), compareEnableIfAttrs(), compareOverloads(), clang::computeDependence(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), diagnoseDiagnoseIfAttrsWith(), clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction(), clang::Sema::FinalizeDeclaration(), findEnforceTCBAttrByName(), getNonNullAttr(), getPrintfFormatArgumentNum(), handleOwnershipAttr(), hasBTFDeclTagAttr(), hasRCAnnotation(), hasSameOverloadableAttrs(), isFunctionAlwaysEnabled(), isRelevantAttr(), mergeAlignedAttrs(), clang::Sema::mergeDeclAttributes(), clang::Sema::mergeFormatAttr(), mergeParamDeclAttributes(), and clang::CodeGen::SanitizerMetadata::reportGlobal().
|
protected |
Update a potentially out-of-date declaration.
Definition at line 63 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 318 of file DeclBase.h.
|
friend |
Definition at line 319 of file DeclBase.h.
|
friend |
Definition at line 320 of file DeclBase.h.
|
friend |
Definition at line 321 of file DeclBase.h.
|
friend |
Definition at line 249 of file DeclBase.h.
|
friend |
Definition at line 322 of file DeclBase.h.
|
friend |
Definition at line 323 of file DeclBase.h.
|
friend |
Definition at line 324 of file DeclBase.h.
|
protected |
Access - Used by C++ decls for the access specifier.
Definition at line 328 of file DeclBase.h.
Referenced by getAccess(), getAccessUnsafe(), and setAccess().
|
mutableprotected |
If 0, we have not computed the linkage of this declaration.
Otherwise, it is the linkage + 1.
Definition at line 338 of file DeclBase.h.
Referenced by getCachedLinkage(), hasCachedLinkage(), and setCachedLinkage().
|
protected |
Whether this declaration was loaded from an AST file.
Definition at line 331 of file DeclBase.h.
Referenced by isFromASTFile(), setFromASTFile(), and clang::ASTDeclReader::VisitDecl().
|
protected |
IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
Definition at line 334 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 three bits are used for the ModuleOwnershipKind.
Definition at line 246 of file DeclBase.h.
Referenced by clang::DeclContext::addHiddenDecl(), clang::DeclContext::BuildDeclChain(), clang::DeclContext::containsDecl(), getModuleOwnershipKind(), getNextDeclInContext(), clang::DeclContext::isDeclInLexicalTraversal(), clang::DeclContext::removeDecl(), clang::RecordDecl::reorderDecls(), and setModuleOwnershipKind().