clang API Documentation
#include <DeclBase.h>
Classes | |
struct | EmptyShell |
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in later (e.g., by some deserialization method). More... | |
struct | MultipleDC |
class | redecl_iterator |
Iterates through all the redeclarations of the same decl. More... | |
Public Types | |
enum | Kind |
Lists the kind of concrete classes of Decl. More... | |
enum | IdentifierNamespace { IDNS_Label = 0x0001, IDNS_Tag = 0x0002, IDNS_Type = 0x0004, IDNS_Member = 0x0008, IDNS_Namespace = 0x0010, IDNS_Ordinary = 0x0020, IDNS_ObjCProtocol = 0x0040, IDNS_OrdinaryFriend = 0x0080, IDNS_TagFriend = 0x0100, IDNS_Using = 0x0200, IDNS_NonMemberOperator = 0x0400, IDNS_LocalExtern = 0x0800 } |
enum | ObjCDeclQualifier { OBJC_TQ_None = 0x0, OBJC_TQ_In = 0x1, OBJC_TQ_Inout = 0x2, OBJC_TQ_Out = 0x4, OBJC_TQ_Bycopy = 0x8, OBJC_TQ_Byref = 0x10, OBJC_TQ_Oneway = 0x20 } |
enum | FriendObjectKind { FOK_None, FOK_Declared, FOK_Undeclared } |
typedef AttrVec::const_iterator | attr_iterator |
typedef llvm::iterator_range < attr_iterator > | attr_range |
typedef llvm::iterator_range < redecl_iterator > | redecl_range |
Public Member Functions | |
virtual SourceRange | getSourceRange () const LLVM_READONLY |
Source range that this declaration covers. | |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
SourceLocation | getLocation () const |
void | setLocation (SourceLocation L) |
Kind | getKind () const |
const char * | getDeclKindName () const |
Decl * | getNextDeclInContext () |
const Decl * | getNextDeclInContext () const |
DeclContext * | getDeclContext () |
const DeclContext * | getDeclContext () const |
Decl * | getNonClosureContext () |
const Decl * | getNonClosureContext () const |
TranslationUnitDecl * | getTranslationUnitDecl () |
const TranslationUnitDecl * | getTranslationUnitDecl () const |
bool | isInAnonymousNamespace () const |
bool | isInStdNamespace () const |
ASTContext & | getASTContext () const LLVM_READONLY |
void | setAccess (AccessSpecifier AS) |
AccessSpecifier | getAccess () const |
AccessSpecifier | getAccessUnsafe () const |
Retrieve the access specifier for this declaration, even though it may not yet have been properly set. | |
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 |
void | setInvalidDecl (bool Invalid=true) |
bool | isInvalidDecl () const |
bool | isImplicit () const |
void | setImplicit (bool I=true) |
bool | isUsed (bool CheckUsedAttr=true) const |
Whether this declaration was used, meaning that a definition is required. | |
void | 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. This should not be relied upon for anything other than debugging. | |
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) |
bool | isModulePrivate () const |
Whether this declaration was marked as being private to the module in which it was defined. | |
AvailabilityResult | getAvailability (std::string *Message=nullptr) const |
Determine the availability of the given declaration. | |
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 in the. | |
unsigned | getOwningModuleID () const |
Retrieve the global ID of the module that owns this particular declaration. | |
Module * | getOwningModule () const |
unsigned | getIdentifierNamespace () const |
bool | isInIdentifierNamespace (unsigned NS) const |
bool | hasTagIdentifierNamespace () const |
DeclContext * | getLexicalDeclContext () |
const DeclContext * | getLexicalDeclContext () const |
virtual bool | isOutOfLine () const |
void | setDeclContext (DeclContext *DC) |
void | setLexicalDeclContext (DeclContext *DC) |
bool | isDefinedOutsideFunctionOrMethod () const |
const DeclContext * | getParentFunctionOrMethod () const |
If this decl is defined inside a function/method/block it returns the corresponding DeclContext, otherwise it returns null. | |
DeclContext * | getParentFunctionOrMethod () |
virtual Decl * | getCanonicalDecl () |
Retrieves the "canonical" declaration of the given declaration. | |
const Decl * | getCanonicalDecl () const |
bool | isCanonicalDecl () const |
Whether this particular Decl is a canonical one. | |
redecl_range | redecls () const |
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). | |
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 most recent 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 |
virtual bool | hasBody () const |
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. | |
SourceLocation | getBodyRBrace () const |
bool | isTemplateParameter () const |
bool | isTemplateParameterPack () const |
bool | isParameterPack () const |
Whether this declaration is a parameter pack. | |
bool | isTemplateDecl () const |
returns true if this declaration is a template | |
bool | isFunctionOrFunctionTemplate () const |
Whether this declaration is a function or function template. | |
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 () |
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. | |
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) const |
const FunctionType * | 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. | |
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 Types | |
enum | { TopLevelDeclInObjCContainerFlag = 0x01, ModulePrivateFlag = 0x02 } |
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 (bool MP=true) |
Specify whether this declaration was marked as being private to the module in which it was defined. | |
void | setOwningModuleID (unsigned ID) |
Set the owning module ID. | |
virtual Decl * | 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 *, 2, unsigned > | NextInContextAndBits |
The next declaration within the same lexical DeclContext. These pointers form the linked list that is traversed via DeclContext's decls_begin()/decls_end(). | |
unsigned | Access: 2 |
Access - Used by C++ decls for the access specifier. | |
unsigned | FromASTFile: 1 |
Whether this declaration was loaded from an AST file. | |
unsigned | Hidden: 1 |
Whether this declaration is hidden from normal name lookup, e.g., because it is was loaded from an AST file is either module-private or because its submodule has not been made visible. | |
unsigned | IdentifierNamespace: 12 |
IdentifierNamespace - This specifies what IDNS_* namespace this lives in. | |
unsigned | CacheValidAndLinkage: 3 |
If 0, we have not computed the linkage of this declaration. Otherwise, it is the linkage + 1. | |
Friends | |
class | DeclContext |
class | CXXClassMemberWrapper |
class | ASTDeclWriter |
class | ASTDeclReader |
class | ASTReader |
class | LinkageComputer |
class | Redeclarable |
Decl - This represents one declaration (or definition), e.g. a variable, typedef, function, struct, etc.
Definition at line 72 of file DeclBase.h.
typedef AttrVec::const_iterator clang::Decl::attr_iterator |
Definition at line 438 of file DeclBase.h.
typedef llvm::iterator_range<attr_iterator> clang::Decl::attr_range |
Definition at line 439 of file DeclBase.h.
typedef llvm::iterator_range<redecl_iterator> clang::Decl::redecl_range |
Reimplemented in clang::UsingShadowDecl, clang::TagDecl, clang::NamespaceAliasDecl, clang::TypedefNameDecl, clang::ObjCProtocolDecl, clang::FunctionDecl, clang::ObjCInterfaceDecl, clang::VarDecl, clang::RedeclarableTemplateDecl, and clang::NamespaceDecl.
Definition at line 776 of file DeclBase.h.
anonymous enum [protected] |
Definition at line 185 of file DeclBase.h.
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 925 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 101 of file DeclBase.h.
enum clang::Decl::Kind |
Lists the kind of concrete classes of Decl.
Reimplemented in clang::ObjCPropertyImplDecl.
Definition at line 75 of file DeclBase.h.
ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declarations. Other than remembering them and mangling them into the method's signature string, these are ignored by the compiler; they are consumed by certain remote-messaging frameworks.
in, inout, and out are mutually exclusive and apply only to method parameters. bycopy and byref are mutually exclusive and apply only to method parameters (?). oneway applies only to results. All of these expect their corresponding parameter to have a particular type. None of this is currently enforced by clang.
This should be kept in sync with ObjCDeclSpec::ObjCDeclQualifier.
OBJC_TQ_None | |
OBJC_TQ_In | |
OBJC_TQ_Inout | |
OBJC_TQ_Out | |
OBJC_TQ_Bycopy | |
OBJC_TQ_Byref | |
OBJC_TQ_Oneway |
Definition at line 173 of file DeclBase.h.
clang::Decl::Decl | ( | Kind | DK, |
DeclContext * | DC, | ||
SourceLocation | L | ||
) | [inline, protected] |
Definition at line 315 of file DeclBase.h.
References add().
clang::Decl::Decl | ( | Kind | DK, |
EmptyShell | Empty | ||
) | [inline, protected] |
Definition at line 326 of file DeclBase.h.
References add().
Decl::~Decl | ( | ) | [protected, virtual] |
Definition at line 214 of file DeclBase.cpp.
Definition at line 135 of file DeclBase.cpp.
Referenced by Decl().
void clang::Decl::addAttr | ( | Attr * | A | ) | [inline] |
Definition at line 431 of file DeclBase.h.
References getAttrs(), hasAttrs(), and setAttrs().
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnPragmaRedefineExtname(), clang::Sema::ActOnPragmaUnused(), clang::Sema::ActOnPragmaWeakID(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignmentAttributesForRecord(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAssumeAlignedAttr(), clang::Sema::AddCFAuditedAttribute(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddMsStructLayoutForRecord(), clang::Sema::AddOptnoneAttributeIfNoConflicts(), AddPropertyAttrs(), clang::Sema::AddPushedVisibilityAttribute(), assignInheritanceModel(), clang::Sema::AttachBaseSpecifiers(), clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::checkInitMethod(), clang::Sema::CheckNontrivialField(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::FinalizeDeclaration(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAliasAttr(), handleAlignedAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArgumentWithTypeTagAttr(), handleARMInterruptAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAttrWithMessage(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCFAuditedTransferAttr(), handleCFUnknownTransferAttr(), handleCleanupAttr(), handleColdAttr(), handleCommonAttr(), handleConstructorAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDestructorAttr(), handleDLLAttr(), handleEnableIfAttr(), handleExclusiveTrylockFunctionAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHotAttr(), handleIBOutlet(), handleIBOutletCollection(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleMallocAttr(), handleModeAttr(), handleMSInheritanceAttr(), handleMSP430InterruptAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOptimizeNoneAttr(), handleOwnershipAttr(), handleParamTypestateAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedTrylockFunctionAttr(), handleSimpleAttribute(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateAttrs(), instantiateDependentEnableIfAttr(), clang::Sema::makeUnavailableInSystemHeader(), mergeAlignedAttrs(), mergeDeclAttribute(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), clang::Sema::ProcessPropertyDecl(), propagateDLLAttrToBaseClassTemplate(), clang::RecordDecl::setCapturedRecord(), clang::ASTDeclReader::UpdateDecl(), and clang::ASTNodeImporter::VisitIndirectFieldDecl().
attr_iterator clang::Decl::attr_begin | ( | ) | const [inline] |
Definition at line 445 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by attrs(), and specific_attr_begin().
attr_iterator clang::Decl::attr_end | ( | ) | const [inline] |
Definition at line 448 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by attrs(), and specific_attr_end().
attr_range clang::Decl::attrs | ( | ) | const [inline] |
Definition at line 441 of file DeclBase.h.
References attr_begin(), and attr_end().
Referenced by AddPropertyAttrs(), clang::Sema::checkThisInStaticMemberFunctionAttributes(), DeclHasAttr(), getAvailability(), hasAttribute(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateAttrs(), clang::ValueDecl::isWeak(), isWeakImported(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), and clang::ASTNodeImporter::VisitIndirectFieldDecl().
bool Decl::canBeWeakImported | ( | bool & | IsDefinition | ) | const |
Determines whether this symbol can be weak-imported, e.g., whether it would be well-formed to add the weak_import attribute.
IsDefinition | Set to true to indicate that this declaration cannot be weak-imported because it has a definition. |
Definition at line 460 of file DeclBase.cpp.
References getASTContext(), clang::ASTContext::getLangOpts(), clang::ObjCRuntime::hasWeakClassImport(), and clang::LangOptions::ObjCRuntime.
Referenced by handleWeakImportAttr(), and isWeakImported().
Decl * Decl::castFromDeclContext | ( | const DeclContext * | D | ) | [static] |
Reimplemented in clang::CapturedDecl, clang::BlockDecl, clang::TagDecl, clang::LinkageSpecDecl, clang::FunctionDecl, clang::ObjCContainerDecl, clang::ObjCMethodDecl, clang::NamespaceDecl, and clang::TranslationUnitDecl.
Definition at line 628 of file DeclBase.cpp.
References clang::DeclContext::getDeclKind().
Referenced by clang::PredefinedExpr::ComputeName(), and clang::cast_convert_decl_context< ToTy, IsKnownSubtype >::doit().
DeclContext * Decl::castToDeclContext | ( | const Decl * | D | ) | [static] |
Definition at line 647 of file DeclBase.cpp.
References getKind().
Referenced by clang::BackendConsumer::StackSizeDiagHandler().
static bool clang::Decl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented in clang::EmptyDecl, clang::ImportDecl, clang::CapturedDecl, clang::BlockDecl, clang::FileScopeAsmDecl, clang::StaticAssertDecl, clang::UnresolvedUsingTypenameDecl, clang::EnumDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::VarTemplateDecl, clang::NamespaceAliasDecl, clang::UsingDirectiveDecl, clang::VarTemplatePartialSpecializationDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::TypedefNameDecl, clang::LinkageSpecDecl, clang::VarTemplateSpecializationDecl, clang::TypeDecl, clang::ObjCPropertyImplDecl, clang::CXXConversionDecl, clang::IndirectFieldDecl, clang::EnumConstantDecl, clang::CXXDestructorDecl, clang::ObjCPropertyDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::ClassScopeFunctionSpecializationDecl, clang::ObjCCompatibleAliasDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::ObjCImplementationDecl, clang::FriendTemplateDecl, clang::ClassTemplateDecl, clang::ObjCCategoryImplDecl, clang::ObjCImplDecl, clang::CXXMethodDecl, clang::ObjCCategoryDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXRecordDecl, clang::ObjCProtocolDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCAtDefsFieldDecl, clang::ObjCIvarDecl, clang::ParmVarDecl, clang::TemplateTemplateParmDecl, clang::ObjCInterfaceDecl, clang::ImplicitParamDecl, clang::VarDecl, clang::NonTypeTemplateParmDecl, clang::TemplateTypeParmDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::ObjCContainerDecl, clang::ValueDecl, clang::ObjCMethodDecl, clang::NamespaceDecl, clang::LabelDecl, clang::NamedDecl, clang::TemplateDecl, clang::FriendDecl, clang::AccessSpecDecl, clang::TranslationUnitDecl, and clang::OMPThreadPrivateDecl.
Definition at line 951 of file DeclBase.h.
void clang::Decl::dropAttr | ( | ) | [inline] |
Definition at line 453 of file DeclBase.h.
References getAttrs().
Referenced by clang::Sema::ActOnFunctionDeclarator(), checkAttributesAfterMerging(), clang::Sema::CheckCompleteVariableDeclaration(), checkDLLAttributeRedeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::FinalizeDeclaration(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::MergeVarDecl(), mergeVisibilityAttr(), and clang::Sema::ProcessDeclAttributeList().
void Decl::dropAttrs | ( | ) |
Definition at line 616 of file DeclBase.cpp.
References clang::ASTContext::eraseDeclAttrs(), and getASTContext().
Referenced by clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), and StripImplicitInstantiation().
LLVM_DUMP_METHOD void Decl::dump | ( | ) | const |
Definition at line 2213 of file ASTDumper.cpp.
References dump().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::arcmt::trans::MigrationContext::dumpGCAttrs(), and clang::ASTContext::DumpRecordLayout().
LLVM_DUMP_METHOD void Decl::dump | ( | raw_ostream & | Out | ) | const |
Definition at line 2215 of file ASTDumper.cpp.
References P.
LLVM_DUMP_METHOD void Decl::dumpColor | ( | ) | const |
Definition at line 2221 of file ASTDumper.cpp.
References P.
void Decl::EnableStatistics | ( | ) | [static] |
Definition at line 107 of file DeclBase.cpp.
Referenced by clang::ParseAST().
AccessSpecifier clang::Decl::getAccess | ( | ) | const [inline] |
Definition at line 410 of file DeclBase.h.
References Access.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnTag(), clang::Sema::ActOnVarTemplateSpecialization(), clang::LookupResult::addDecl(), clang::Sema::BuildAnonymousStructUnionMemberReference(), BuildCXXCastArgument(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), clang::MemberExpr::Create(), DiagnoseAccessPath(), clang::Sema::EndOpenMPDSABlock(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), IsAccessible(), IsInitializerListConstructorConversion(), IsMicrosoftUsingDeclarationAccessBug(), clang::Sema::IsSimplyAccessible(), IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), clang::Sema::LookupQualifiedName(), mangleThunkThisAdjustment(), clang::Sema::MergeVarDecl(), ResolveConstructorOverload(), clang::Sema::SetMemberAccessSpecifier(), TryConstructorInitialization(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTDeclWriter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::ASTNodeImporter::VisitVarTemplateDecl().
AccessSpecifier clang::Decl::getAccessUnsafe | ( | ) | const [inline] |
Retrieve the access specifier for this declaration, even though it may not yet have been properly set.
Definition at line 417 of file DeclBase.h.
References Access.
Returns the function itself, or the templated function if this is a function template.
Definition at line 162 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnReenterFunctionContext(), AddResultTypeChunk(), clang::Sema::canSkipFunctionBody(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckOverload(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::FindAssociatedClassesAndNamespaces(), getAsFunction(), GetConversionType(), clang::getDeclUsageType(), getLVForNamespaceScopeDecl(), hasOnlyNonStaticMemberFunctions(), clang::ADLResult::insert(), clang::NamedDecl::isCXXInstanceMember(), clang::Sema::MergeFunctionDecl(), and TryDiagnoseProtectedAccess().
const FunctionDecl* clang::Decl::getAsFunction | ( | ) | const [inline] |
Definition at line 859 of file DeclBase.h.
References getAsFunction().
ASTContext & Decl::getASTContext | ( | ) | const |
Reimplemented in clang::TranslationUnitDecl.
Definition at line 273 of file DeclBase.cpp.
References clang::TranslationUnitDecl::getASTContext(), and getTranslationUnitDecl().
Referenced by clang::DeclContext::addHiddenDecl(), AddObjCProperties(), clang::CXXMethodDecl::addOverriddenMethod(), clang::CXXMethodDecl::begin_overridden_methods(), canBeWeakImported(), clang::VarDecl::checkInitIsICE(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::PredefinedExpr::ComputeName(), clang::CXXRecordDecl::conversion_begin(), clang::CXXRecordDecl::conversion_end(), clang::NamedDecl::declarationReplaces(), clang::DeclRefExpr::DeclRefExpr(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), dropAttrs(), clang::CXXMethodDecl::end_overridden_methods(), clang::VarDecl::ensureEvaluatedStmt(), clang::VarDecl::evaluateValue(), findAnonymousStructOrUnionIndex(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::RedeclarableTemplateDecl::findSpecializationImpl(), clang::AnalysisDeclContext::getASTContext(), getASTMutationListener(), clang::ASTContext::getASTRecordLayout(), getAttrs(), getAvailability(), clang::ObjCMethodDecl::getBody(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getBuiltinID(), clang::AnalysisDeclContext::getCFG(), clang::FunctionDecl::getClassScopeSpecializationPattern(), clang::RedeclarableTemplateDecl::getCommonPtr(), clang::FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction(), clang::VarDecl::getDescribedVarTemplate(), clang::CXXRecordDecl::getDestructor(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCCategoryDecl::getImplementation(), clang::CXXRecordDecl::getIndirectPrimaryBases(), clang::CXXConstructorDecl::getInheritedConstructor(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::FunctionTemplateDecl::getInjectedTemplateArgs(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CXXRecordDecl::getLambdaStaticInvoker(), clang::LinkageComputer::getLVForDecl(), getLVForLocalDecl(), getLVForNamespaceScopeDecl(), getMaxAlignment(), clang::VarDecl::getMemberSpecializationInfo(), clang::FunctionDecl::getMinRequiredArguments(), clang::CXXRecordDecl::getMSVtorDispMode(), getPolymorphicOffset(), clang::getPrimaryMergedDecl(), clang::NamedDecl::getQualifiedNameAsString(), clang::FunctionDecl::getReturnTypeSourceRange(), getSelfInitExpr(), clang::ObjCMethodDecl::getSendResultType(), clang::AnalysisDeclContext::getUnoptimizedCFG(), getVisibilityOf(), clang::CXXRecordDecl::getVisibleConversionFunctions(), clang::ento::CheckerContext::isCLibraryFunction(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionDecl::isMSExternInline(), isMsLayout(), clang::Expr::isPotentialConstantExpr(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), clang::ASTNodeImporter::IsStructuralMatch(), clang::CXXMethodDecl::isUsualDeallocationFunction(), isWeakImported(), clang::FunctionTemplateDecl::LoadLazySpecializations(), clang::ClassTemplateDecl::LoadLazySpecializations(), clang::VarTemplateDecl::LoadLazySpecializations(), clang::CXXRecordDecl::lookupInBases(), clang::RecordDecl::mayInsertExtraPadding(), print(), clang::NamedDecl::printQualifiedName(), clang::FunctionTemplateSpecializationInfo::Profile(), clang::ClassTemplateSpecializationDecl::Profile(), clang::VarTemplateSpecializationDecl::Profile(), clang::CXXRecordDecl::removeConversion(), clang::ObjCMethodDecl::setAsRedeclaration(), setAttrs(), clang::CXXRecordDecl::setBases(), clang::RecordDecl::setCapturedRecord(), clang::ObjCImplDecl::setClassInterface(), clang::FunctionDecl::setDeclsInPrototypeScope(), clang::VarDecl::setDescribedVarTemplate(), clang::MaterializeTemporaryExpr::setExtendingDecl(), clang::ObjCInterfaceDecl::setExternallyCompleted(), clang::ClassTemplateSpecializationDecl::setExternLoc(), clang::VarTemplateSpecializationDecl::setExternLoc(), clang::ObjCInterfaceDecl::setImplementation(), clang::ObjCCategoryDecl::setImplementation(), clang::CXXConstructorDecl::setInheritedConstructor(), clang::VarDecl::setInit(), clang::ClassTemplateSpecializationDecl::setInstantiationOf(), clang::VarTemplateSpecializationDecl::setInstantiationOf(), clang::CXXRecordDecl::setInstantiationOfMemberClass(), clang::VarDecl::setInstantiationOfStaticDataMember(), setLexicalDeclContext(), clang::LabelDecl::setMSAsmLabel(), SetNestedNameSpecifier(), clang::BlockDecl::setParams(), clang::DeclaratorDecl::setQualifierInfo(), clang::TagDecl::setQualifierInfo(), clang::ClassTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::VarTemplateSpecializationDecl::setTemplateKeywordLoc(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::TagDecl::setTemplateParameterListsInfo(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::VarTemplateSpecializationDecl::setTypeAsWritten(), shouldRunOnFunctionOrMethod(), clang::CXXMethodDecl::size_overridden_methods(), clang::TagDecl::startDefinition(), updateOutOfDate(), useInlineVisibilityHidden(), and clang::ASTNodeImporter::VisitRecordDecl().
ASTMutationListener * Decl::getASTMutationListener | ( | ) | const [protected] |
Definition at line 277 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getASTMutationListener().
Referenced by clang::ClassTemplateDecl::AddPartialSpecialization(), clang::VarTemplateDecl::AddPartialSpecialization(), clang::FunctionTemplateDecl::addSpecialization(), clang::ClassTemplateDecl::AddSpecialization(), clang::VarTemplateDecl::AddSpecialization(), and clang::TagDecl::completeDefinition().
T* clang::Decl::getAttr | ( | ) | const [inline] |
Definition at line 478 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnVariableDeclarator(), AddVariableConstraints(), checkAttributesAfterMerging(), checkAttrMutualExclusion(), clang::Sema::CheckBaseSpecifier(), clang::consumed::ConsumedStmtVisitor::checkCallability(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), checkDLLAttributeRedeclaration(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), CheckNakedParmReference(), clang::Sema::CheckOverrideControl(), clang::consumed::ConsumedStateMap::checkParamsForReturnTypestate(), clang::Sema::DiagnoseSentinelCalls(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), EmitGlobalNamedRegister(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::Sema::FinalizeDeclaration(), GenOpenCLArgMetadata(), getCallingConventionForDecl(), clang::getDLLAttr(), getNonNullAttr(), clang::CXXUuidofExpr::GetUuidAttrOfType(), getVisibilityOf(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::consumed::ConsumedStmtVisitor::handleCall(), handleVecReturnAttr(), handleVecTypeHint(), handleWorkGroupSize(), clang::MangleContext::mangleName(), mapConsumableAttrState(), MaybeAddSentinel(), clang::Sema::mergeDeclAttributes(), clang::Sema::mergeDLLExportAttr(), clang::Sema::MergeFunctionDecl(), clang::Sema::mergeMSInheritanceAttr(), mergeParamDeclAttributes(), clang::Sema::mergeSectionAttr(), mergeVisibilityAttr(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), clang::CodeGen::CodeGenModule::setTLSMode(), testsFor(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), clang::Sema::UnifySection(), clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
AttrVec& clang::Decl::getAttrs | ( | ) | [inline] |
Definition at line 425 of file DeclBase.h.
Referenced by addAttr(), attr_begin(), attr_end(), AttributesMatch(), clang::Sema::BuildReturnStmt(), clang::Sema::CheckEnableIf(), checkNewAttributesAfterDef(), dropAttr(), getAttr(), clang::threadSafety::ThreadSafetyAnalyzer::getEdgeLockset(), getMaxAlignment(), hasAttr(), clang::isBetterOverloadCandidate(), clang::Sema::mergeAvailabilityAttr(), clang::threadSafety::ThreadSafetyAnalyzer::runAnalysis(), and clang::ASTDeclWriter::VisitDecl().
const AttrVec & Decl::getAttrs | ( | ) | const |
Definition at line 623 of file DeclBase.cpp.
References getASTContext(), and clang::ASTContext::getDeclAttrs().
AvailabilityResult Decl::getAvailability | ( | std::string * | Message = 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. |
Definition at line 417 of file DeclBase.cpp.
References clang::AR_Available, clang::AR_Deprecated, clang::AR_Unavailable, attrs(), CheckAvailability(), and getASTContext().
Referenced by clang::Sema::addMethodToGlobalList(), clang::Sema::CanUseDecl(), DiagnoseAvailabilityOfDecl(), clang::Sema::DiagnoseUnimplementedProperties(), clang::Sema::getCurContextAvailability(), getDeclAvailability(), clang::Sema::getDeletedOrUnavailableSuffix(), isDeprecated(), isUnavailable(), and WarnUndefinedMethod().
virtual Stmt* clang::Decl::getBody | ( | ) | const [inline, virtual] |
getBody - If this Decl represents a declaration for a body of code, such as a function or method definition, this method returns the top-level Stmt* of that body. Otherwise this method returns null.
Reimplemented in clang::CapturedDecl, clang::BlockDecl, clang::FunctionDecl, and clang::ObjCMethodDecl.
Definition at line 817 of file DeclBase.h.
Referenced by CheckStringRefAssignedTemporary(), clang::ento::PathDiagnosticLocation::createDeclBegin(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), getBodyRBrace(), hasBody(), clang::CallGraph::includeInGraph(), and clang::sema::AnalysisBasedWarnings::IssueWarnings().
SourceLocation Decl::getBodyRBrace | ( | ) | const |
getBodyRBrace - Gets the right brace of the body, if a body exists. This works whether the body is a CompoundStmt or a CXXTryStmt.
Definition at line 666 of file DeclBase.cpp.
References getBody(), clang::SourceRange::getEnd(), and clang::FunctionDecl::getSourceRange().
Referenced by clang::ento::PathDiagnosticLocation::createDeclEnd(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), and clang::CodeGen::CodeGenFunction::GenerateObjCMethod().
Linkage clang::Decl::getCachedLinkage | ( | ) | const [inline, protected] |
Definition at line 341 of file DeclBase.h.
References CacheValidAndLinkage.
Referenced by clang::LinkageComputer::getLVForDecl(), and clang::NamedDecl::isLinkageValid().
virtual Decl* clang::Decl::getCanonicalDecl | ( | ) | [inline, virtual] |
Retrieves the "canonical" declaration of the given declaration.
Reimplemented in clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::EnumDecl, clang::UsingShadowDecl, clang::TagDecl, clang::VarTemplateDecl, clang::NamespaceAliasDecl, clang::TypedefNameDecl, clang::EnumConstantDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionDecl, clang::CXXMethodDecl, clang::ObjCProtocolDecl, clang::ObjCInterfaceDecl, clang::VarDecl, clang::FunctionTemplateDecl, clang::CXXRecordDecl, clang::RedeclarableTemplateDecl, clang::NamespaceDecl, and clang::ObjCMethodDecl.
Definition at line 710 of file DeclBase.h.
Referenced by clang::Sema::BuildCXXNestedNameSpecifier(), checkForFunctionCall(), CheckTemplateArgumentPointerToMember(), compareDeclarations(), clang::declaresSameEntity(), DiagnoseInvalidRedeclaration(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseUseOfDecl(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::ADLResult::erase(), getCanonicalDecl(), getCanonicalParmVarDecl(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTContext::getCanonicalTemplateName(), clang::ASTContext::getCommentForDecl(), getDeclForLocalLookup(), clang::VTableContextBase::getThunkInfo(), HasSameBase(), clang::ADLResult::insert(), isCanonicalDecl(), IsEquivalentForUsingDecl(), clang::OverloadCandidateSet::isNewCandidate(), isSameDeclaration(), isSameTemplate(), IsStructurallyEquivalent(), clang::Sema::LookupTemplateName(), MatchesFriend(), clang::LookupResult::resolveKind(), and wasDifferentDeclUsedForInlining().
const Decl* clang::Decl::getCanonicalDecl | ( | ) | const [inline] |
Reimplemented in clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::EnumDecl, clang::UsingShadowDecl, clang::VarTemplateDecl, clang::TagDecl, clang::NamespaceAliasDecl, clang::TypedefNameDecl, clang::EnumConstantDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionDecl, clang::CXXMethodDecl, clang::ObjCProtocolDecl, clang::ObjCInterfaceDecl, clang::VarDecl, clang::FunctionTemplateDecl, clang::CXXRecordDecl, clang::RedeclarableTemplateDecl, clang::NamespaceDecl, and clang::ObjCMethodDecl.
Definition at line 711 of file DeclBase.h.
References getCanonicalDecl().
DeclContext* clang::Decl::getDeclContext | ( | ) | [inline] |
Definition at line 375 of file DeclBase.h.
Referenced by clang::Sema::ActOnBlockStart(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnDeclarator(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishObjCImplementation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), addAssociatedClassesAndNamespaces(), clang::Sema::AddFunctionCandidates(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddMethodCandidate(), clang::Sema::addMethodToGlobalList(), clang::CodeGen::CodeGenTypes::addRecordTypeName(), addRedeclaredMethods(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXDefaultArgExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVarTemplateInstantiation(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConstructor(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), CheckExplicitInstantiationScope(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::checkInitMethod(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCMethodOverrides(), checkObjCUnusedIvar(), CheckOperatorNewDeleteDeclarationScope(), clang::Sema::CheckShadow(), clang::Sema::CheckTemplateArgument(), CheckTemplateSpecializationScope(), clang::Sema::CheckUsingShadowDecl(), ClassifyImplicitMemberAccess(), ClassifyMemberExpr(), collectOverriddenMethodsSlow(), collectViableConversionCandidates(), clang::ASTReader::CompleteRedeclChain(), computeCachedProperties(), computeDeclRefDependence(), computeLVForDecl(), clang::PredefinedExpr::ComputeName(), clang::CodeCompletionResult::CreateCodeCompletionString(), createFriendTagNNSFixIt(), clang::NamedDecl::declarationReplaces(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::DefaultSynthesizeProperties(), DiagnoseBaseOrMemInitializerOrder(), clang::Sema::DiagnoseEmptyLookup(), diagnoseInstanceReference(), DiagnoseInvalidRedeclaration(), diagnoseUncapturableValueReference(), DoMarkVarDeclReferenced(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), clang::Sema::FinalizeDeclaration(), findAnonymousStructOrUnionIndex(), FindConversionForRefInit(), FindDeclaringClass(), findExplicitInstancetypeDeclarer(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::Sema::FixOverloadedFunctionReference(), FormatFunctionParameter(), getAssignmentAction(), clang::FunctionDecl::getBuiltinID(), clang::ObjCMethodDecl::getCanonicalDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCIvarDecl::getContainingInterface(), getContextForScopeMatching(), clang::FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction(), getDeclAvailability(), getDeclContext(), getDefiningModule(), getFieldIndex(), getLVForClassMember(), getLVForClosure(), getLVForNamespaceScopeDecl(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), getMethodReceiverIfKnownImmutable(), clang::ASTContext::getObjContainingInterface(), getOutermostFuncOrBlockContext(), clang::ObjCMethodDecl::getOverriddenMethods(), getParentFunctionOrMethod(), clang::ParmVarDecl::getSourceRange(), getStackIndexOfNearestEnclosingCaptureReadyLambda(), getStaticDeclName(), clang::Sema::getTemplateInstantiationArgs(), getTranslationUnitDecl(), clang::ento::MemRegionManager::getVarRegion(), clang::Sema::HandleDelayedAccessCheck(), handleIBOutletCollection(), handleObjCDesignatedInitializer(), handleObjCRequiresSuperAttr(), HandleTagNumbering(), handleWeakRefAttr(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), clang::Sema::HideUsingShadowDecl(), clang::ASTNodeImporter::ImportDeclParts(), clang::threadSafety::ThreadSafetyAnalyzer::inCurrentScope(), InNamespace(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::InstantiateVariableDefinition(), clang::ento::CheckerContext::isCLibraryFunction(), clang::NamedDecl::isCXXClassMember(), isDeclDeprecated(), clang::IdentifierResolver::isDeclInScope(), isDeclUnavailable(), isDeclWithinFunction(), clang::TemplateArgument::isDependent(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), isFunctionLocalClass(), IsFunctionStdAbs(), clang::FunctionDecl::isGlobal(), isInAnonymousNamespace(), clang::RecordDecl::isInjectedClassName(), clang::TemplateArgument::isInstantiationDependent(), isInStdNamespace(), isInStdNamespace(), clang::CXXRecordDecl::isLocalClass(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::Expr::isObjCSelfExpr(), isOutOfLine(), isOutOfScopePreviousDeclaration(), isReferenceToNonConstCapture(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), isSingleLineLanguageLinkage(), clang::Sema::isStdInitializerList(), IsStructurallyEquivalent(), IsTailPaddedMemberArray(), isTrackedVar(), IsUserDefinedConversion(), clang::CXXMethodDecl::isUsualDeallocationFunction(), IsWithinTemplateSpecialization(), LookupMemberExpr(), clang::Sema::LookupOrCreateLabel(), clang::DeclContext::makeDeclVisibleInContext(), clang::MangleContext::mangleObjCMethodName(), clang::Sema::MarkFunctionReferenced(), MatchesFriend(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), clang::Sema::mergeObjCMethodDecls(), mergeParamDeclAttributes(), MightInstantiateTo(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrintInstantiationStack(), clang::NamedDecl::printQualifiedName(), clang::Sema::PushOnScopeChains(), setLexicalDeclContext(), clang::FunctionDecl::setPure(), shouldConsiderLinkage(), ShouldDiagnoseUnusedDecl(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::Sema::startLambdaDefinition(), SubstDefaultTemplateArgument(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::IdentifierResolver::tryAddTopLevelDecl(), clang::Sema::tryCaptureVariable(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), ValidDuplicateEnum(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
const DeclContext* clang::Decl::getDeclContext | ( | ) | const [inline] |
Definition at line 380 of file DeclBase.h.
References getDeclContext().
const char * Decl::getDeclKindName | ( | ) | const |
Definition at line 77 of file DeclBase.cpp.
Referenced by clang::ASTNodeImporter::VisitDecl().
FriendObjectKind clang::Decl::getFriendObjectKind | ( | ) | const [inline] |
Determines whether this declaration is the object of a friend declaration and, if so, what kind.
There is currently no direct way to find the associated FriendDecl.
Definition at line 935 of file DeclBase.h.
References FOK_Declared, FOK_None, FOK_Undeclared, IDNS_Ordinary, IDNS_OrdinaryFriend, IDNS_Tag, and IDNS_TagFriend.
Referenced by clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckMemberSpecialization(), clang::Sema::CheckOverload(), clang::FriendDecl::Create(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), 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 715 of file DeclBase.cpp.
References clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::BlockPointerType::getPointeeType(), clang::Type::isBlockPointerType(), and clang::Type::isFunctionPointerType().
Referenced by getFunctionOrMethodNumParams(), getFunctionOrMethodParamType(), getFunctionOrMethodResultType(), handleNonNullAttrParameter(), handleSentinelAttr(), handleWarnUnusedResult(), hasFunctionProto(), isFunctionOrMethod(), and isFunctionOrMethodVariadic().
unsigned clang::Decl::getGlobalID | ( | ) | const [inline] |
Retrieve the global declaration ID associated with this declaration, which specifies where in the.
Definition at line 622 of file DeclBase.h.
References isFromASTFile().
Referenced by clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), and clang::ASTReader::getOwningModuleFile().
unsigned clang::Decl::getIdentifierNamespace | ( | ) | const [inline] |
Definition at line 648 of file DeclBase.h.
Referenced by clang::StoredDeclsList::AddSubsequentDecl(), clang::Sema::ArgumentDependentLookup(), clang::Sema::BuildUsingDeclaration(), CalculateHiddenNames(), hasTagIdentifierNamespace(), isInIdentifierNamespace(), setLocalExternDecl(), setObjectOfFriendDecl(), clang::UsingShadowDecl::setTargetDecl(), shouldBeHidden(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTDeclWriter::VisitRedeclarableTemplateDecl(), and clang::ASTDeclWriter::VisitTagDecl().
unsigned Decl::getIdentifierNamespaceForKind | ( | Kind | DK | ) | [static] |
Definition at line 509 of file DeclBase.cpp.
References IDNS_Label, IDNS_Member, IDNS_Namespace, IDNS_ObjCProtocol, IDNS_Ordinary, IDNS_Tag, IDNS_Type, IDNS_Using, and Record.
Kind clang::Decl::getKind | ( | ) | const [inline] |
Definition at line 369 of file DeclBase.h.
Referenced by clang::Sema::ActOnFields(), clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), clang::ASTDeclReader::attachLatestDecl(), clang::ASTDeclReader::attachPreviousDecl(), clang::Sema::BuildDeclarationNameExpr(), castToDeclContext(), clang::comments::Sema::checkReturnsCommand(), clang::OMPThreadPrivateDecl::classof(), clang::TranslationUnitDecl::classof(), clang::AccessSpecDecl::classof(), clang::FriendDecl::classof(), clang::TemplateDecl::classof(), clang::NamedDecl::classof(), clang::LabelDecl::classof(), clang::NamespaceDecl::classof(), clang::ObjCMethodDecl::classof(), clang::ValueDecl::classof(), clang::ObjCContainerDecl::classof(), clang::DeclaratorDecl::classof(), clang::RedeclarableTemplateDecl::classof(), clang::FunctionTemplateDecl::classof(), clang::NonTypeTemplateParmDecl::classof(), clang::VarDecl::classof(), clang::ImplicitParamDecl::classof(), clang::ObjCInterfaceDecl::classof(), clang::TemplateTemplateParmDecl::classof(), clang::ParmVarDecl::classof(), clang::ObjCIvarDecl::classof(), clang::ObjCAtDefsFieldDecl::classof(), clang::ClassTemplateSpecializationDecl::classof(), clang::DeclContext::classof(), clang::ObjCProtocolDecl::classof(), clang::CXXRecordDecl::classof(), clang::ClassTemplatePartialSpecializationDecl::classof(), clang::ObjCCategoryDecl::classof(), clang::CXXMethodDecl::classof(), clang::ObjCImplDecl::classof(), clang::ObjCCategoryImplDecl::classof(), clang::ClassTemplateDecl::classof(), clang::FriendTemplateDecl::classof(), clang::ObjCImplementationDecl::classof(), clang::FunctionDecl::classof(), clang::TypeAliasTemplateDecl::classof(), clang::ObjCCompatibleAliasDecl::classof(), clang::ClassScopeFunctionSpecializationDecl::classof(), clang::CXXConstructorDecl::classof(), clang::FieldDecl::classof(), clang::ObjCPropertyDecl::classof(), clang::CXXDestructorDecl::classof(), clang::EnumConstantDecl::classof(), clang::IndirectFieldDecl::classof(), clang::CXXConversionDecl::classof(), clang::ObjCPropertyImplDecl::classof(), clang::TypeDecl::classof(), clang::VarTemplateSpecializationDecl::classof(), clang::LinkageSpecDecl::classof(), clang::TypedefNameDecl::classof(), clang::TypedefDecl::classof(), clang::TypeAliasDecl::classof(), clang::VarTemplatePartialSpecializationDecl::classof(), clang::UsingDirectiveDecl::classof(), clang::NamespaceAliasDecl::classof(), clang::VarTemplateDecl::classof(), clang::UsingShadowDecl::classof(), clang::TagDecl::classof(), clang::UsingDecl::classof(), clang::UnresolvedUsingValueDecl::classof(), clang::EnumDecl::classof(), clang::UnresolvedUsingTypenameDecl::classof(), clang::StaticAssertDecl::classof(), clang::MSPropertyDecl::classof(), clang::FileScopeAsmDecl::classof(), clang::CapturedDecl::classof(), clang::EmptyDecl::classof(), compareDeclarations(), computeLVForDecl(), clang::NamedDecl::declarationReplaces(), dumpPreviousDecl(), clang::CodeGen::CodeGenFunction::EmitDecl(), clang::CodeGen::CodeGenModule::EmitDeferredUnusedCoverageMappings(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::comments::DeclInfo::fill(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCIvarDecl::getContainingInterface(), clang::getCursorKindForDecl(), clang::ast_type_traits::ASTNodeKind::getFromNode(), getKind(), clang::NamedDecl::getUnderlyingDecl(), clang::Sema::isCopyElisionCandidate(), isInstantiationOf(), clang::comments::Sema::isObjCPropertyDecl(), isSameEntity(), isSameTemplateParameter(), IsStructurallyEquivalent(), isTemplateParameter(), MatchTemplateParameterKind(), clang::ento::CheckerManager::runCheckersOnASTDecl(), setNonMemberOperator(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::declvisitor::Base< declvisitor::make_ptr, ASTNodeImporter, Decl * >::Visit(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclReader::VisitRedeclarableTemplateDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().
DeclContext* clang::Decl::getLexicalDeclContext | ( | ) | [inline] |
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC). May be different from getDeclContext() (SemanticDC). e.g.:
namespace A { void f(); // SemanticDC == LexicalDC == 'namespace A' } void A::f(); // SemanticDC == namespace 'A' LexicalDC == global namespace
Definition at line 674 of file DeclBase.h.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnStartOfFunctionDef(), clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildVariableInstantiation(), clang::DeclContext::containsDecl(), DiagUninitUse(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ASTWriter::getAnonymousDeclarationNumber(), getContextForScopeMatching(), getLexicalDeclContext(), clang::Sema::getTemplateInstantiationArgs(), clang::Sema::HandleDelayedAccessCheck(), clang::ASTNodeImporter::ImportDeclParts(), clang::Sema::InstantiateVariableDefinition(), clang::VarDecl::isInExternCContext(), clang::FunctionDecl::isInExternCContext(), clang::VarDecl::isInExternCXXContext(), clang::FunctionDecl::isInExternCXXContext(), isOutOfLine(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), mergeTypeWithPrevious(), clang::Sema::MergeVarDecl(), clang::serialization::needsAnonymousDeclarationNumber(), clang::Sema::PushOnScopeChains(), RedeclForcesDefC99(), clang::Sema::RegisterLocallyScopedExternCDecl(), clang::DeclContext::removeDecl(), setLexicalDeclContext(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::Sema::UseArgumentDependentLookup(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTDeclReader::VisitVarDeclImpl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
const DeclContext* clang::Decl::getLexicalDeclContext | ( | ) | const [inline] |
Definition at line 679 of file DeclBase.h.
References getLexicalDeclContext().
SourceLocation clang::Decl::getLocation | ( | ) | const [inline] |
Definition at line 366 of file DeclBase.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCapturedRegionError(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCompatibilityAlias(), clang::Sema::ActOnCompoundStmt(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnDefs(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnForwardClassDeclaration(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnLabelStmt(), clang::Sema::ActOnLambdaError(), clang::Sema::ActOnLambdaExpr(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::ActOnStartProtocolInterface(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), clang::ASTUnit::addFileLevelDecl(), addFunctionPointerConversion(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::AddInitializerToDecl(), addInstantiatedParametersToScope(), clang::Sema::AddKnownFunctionAttributes(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::Sema::AtomicPropertySetterGetterRules(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXDefaultArgExpr(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXNew(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclRefExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), clang::Sema::buildInitCaptureField(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildMicrosoftCAnonymousStruct(), BuildNonArrayForRange(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::Sema::BuildUnaryTransformType(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::ObjCMethodCall::canBeOverridenInSubclass(), captureInBlock(), captureInLambda(), CheckAnonMemberRedeclaration(), clang::Sema::CheckARCMethodDecl(), checkARCPropertyDecl(), checkARCPropertyImpl(), checkAttributesAfterMerging(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprFunction(), clang::Sema::CheckConstexprFunctionBody(), clang::Sema::CheckConstexprFunctionDecl(), CheckConstexprParameterTypes(), clang::Sema::CheckConstructor(), clang::Sema::CheckCXXDefaultArguments(), clang::Sema::CheckDestructor(), checkDLLAttribute(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckEquivalentExceptionSpec(), CheckExplicitInstantiationScope(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::CheckFieldDecl(), CheckForDanglingReferenceOrPointer(), CheckForDuplicateEnumValues(), clang::Sema::CheckForFunctionRedefinition(), CheckForReference(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), clang::Sema::CheckImplementationIvars(), clang::Sema::checkInitMethod(), checkIsValidOpenCLKernelParameter(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckMain(), clang::Sema::CheckMemberSpecialization(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::Sema::checkMSInheritanceAttrOnDefinition(), clang::Sema::CheckMSVCRTEntryPoint(), checkNewAttributesAfterDef(), clang::Sema::CheckNontrivialField(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckObjCBridgeRelatedConversions(), clang::Sema::CheckObjCDeclScope(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCMethodOverrides(), checkObjCUnusedIvar(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionAttributes(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckParmsForFunctionDef(), CheckPoppedLabel(), clang::Sema::CheckPureMethod(), clang::Sema::checkRetainCycles(), CheckReturnStackAddr(), clang::Sema::CheckShadow(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSpecializationInstantiationRedecl(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTemplateParameterList(), CheckTemplateSpecializationScope(), clang::Sema::CheckTemplateTypeArgument(), CheckTrivialDefaultConstructor(), checkTrivialSubobjectCall(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckTypenameType(), checkUndefinedButUsed(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::CheckVariableDeclarationType(), compare(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpec(), clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec(), ConvertDeducedTemplateArgument(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeduceReturnType(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), clang::Sema::DefineUsedVTables(), DelegatingCycleHelper(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseAmbiguousLookup(), DiagnoseARCUseOfWeakReceiver(), diagnoseArityMismatch(), DiagnoseArityMismatch(), clang::Sema::DiagnoseAssignmentResult(), clang::Sema::DiagnoseAutoDeductionFailure(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseCalleeStaticArrayParam(), clang::Sema::DiagnoseClassExtensionDupMethods(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), diagnoseDeprecatedCopyOperation(), DiagnoseDirectIsaAccess(), clang::Sema::DiagnoseDuplicateIvars(), DiagnoseFailedEnableIfAttr(), clang::Sema::DiagnoseHiddenVirtualMethods(), DiagnoseInvalidRedeclaration(), clang::Sema::DiagnoseMissingDesignatedInitOverrides(), DiagnoseNamespaceInlineMismatch(), clang::Sema::DiagnoseNontrivial(), DiagnoseObjCImplementedDeprecations(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::Sema::DiagnoseTemplateParameterShadow(), clang::Sema::diagnoseTypo(), diagnoseUncapturableValueReference(), DiagnoseUnimplementedAccessor(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), clang::Sema::DiagnoseUnusedBackingIvarInAccessor(), clang::Sema::DiagnoseUnusedDecl(), DiagUninitUse(), DoEmitAvailabilityWarning(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::Sema::EndOpenMPDSABlock(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), clang::Expr::EvaluateAsInitializer(), evaluateVarDeclInit(), clang::Expr::EvaluateWithSubstitution(), clang::Sema::FinalizeDeclaration(), clang::Sema::FinalizeVarWithDestructor(), clang::Sema::FindAllocationFunctions(), findCompleteObject(), findDefaultInitializer(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FindProtocolDeclaration(), FinishTemplateArgumentDeduction(), clang::Sema::FinishTemplateArgumentDeduction(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(), clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::AccessSpecDecl::getAccessSpecifierLoc(), clang::NamespaceAliasDecl::getAliasLoc(), GetDeclSpecTypeForDeclarator(), clang::Sema::getDestructorName(), clang::ObjCInterfaceDecl::getEndOfDefinitionLoc(), GetFullTypeForDeclarator(), clang::UsingDirectiveDecl::getIdentLocation(), getInitializationLoc(), GetLocationForCandidate(), clang::LinkageSpecDecl::getLocEnd(), clang::ObjCMethodDecl::getLocStart(), clang::UsingDecl::getNameInfo(), clang::UnresolvedUsingValueDecl::getNameInfo(), clang::ASTContext::getRawCommentForDeclNoCache(), clang::CXXCtorInitializer::getSourceLocation(), clang::ASTReader::getSourceLocationForDeclID(), clang::FriendDecl::getSourceRange(), clang::ObjCMethodDecl::getSourceRange(), clang::LabelDecl::getSourceRange(), getSourceRange(), clang::DeclaratorDecl::getSourceRange(), clang::ObjCInterfaceDecl::getSourceRange(), clang::VarDecl::getSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::TemplateTemplateParmDecl::getSourceRange(), clang::ObjCProtocolDecl::getSourceRange(), clang::ObjCPropertyDecl::getSourceRange(), clang::EnumConstantDecl::getSourceRange(), clang::ObjCPropertyImplDecl::getSourceRange(), clang::TypedefDecl::getSourceRange(), clang::UsingDirectiveDecl::getSourceRange(), clang::TagDecl::getSourceRange(), clang::StaticAssertDecl::getSourceRange(), clang::BlockDecl::getSourceRange(), clang::ImportDecl::getSourceRange(), clang::Sema::getTypeName(), clang::ento::MemRegionManager::getVarRegion(), handleCleanupAttr(), handleFormatAttr(), handleModeAttr(), clang::threadSafety::ThreadSafetyReporter::handleMutexNotHeld(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), clang::Sema::HandlePropertyInClassExtension(), handleTransparentUnionAttr(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), clang::Sema::ImplMethodsVsClassMethods(), clang::ASTNodeImporter::ImportDeclParts(), clang::ASTNodeImporter::ImportDefinition(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::Sema::inferObjCARCLifetime(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::Sema::isAcceptableTagRedeclaration(), clang::TagTypeLoc::isDefinition(), isForbiddenTypeAllowed(), clang::LabelDecl::isGnuLocal(), clang::Sema::isIncompatibleTypedef(), clang::ento::CallEvent::isInSystemHeader(), clang::ObjCPropertyImplDecl::isIvarNameSpecified(), isNullPointerValueTemplateArgument(), clang::Sema::IsOverload(), clang::Expr::isPotentialConstantExpr(), IsStructurallyEquivalent(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), isVariableCapturable(), clang::Sema::LookupInObjCMethod(), clang::Sema::LookupSpecialMember(), LookupStdInitializerList(), clang::Sema::LookupTemplateName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MatchAllMethodDeclarations(), MatchTemplateParameterKind(), clang::RecordDecl::mayInsertExtraPadding(), mergeAlignedAttrs(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), mergeParamDeclAttributes(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::MergeVarDeclTypes(), clang::Sema::NoteDeletedFunction(), NoteFunctionCandidate(), clang::Sema::NoteHiddenVirtualMethods(), NoteLValueLocation(), clang::Sema::NoteOverloadCandidate(), noteOverloads(), NoteSurrogateCandidate(), clang::Sema::ParseObjCSelectorExpression(), clang::Sema::ParseTypedefDecl(), clang::InitializationSequence::Perform(), clang::Sema::PerformOpenMPImplicitIntegerConversion(), clang::PrettyDeclStackTraceEntry::print(), clang::PrettyStackTraceDecl::print(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), propagateDLLAttrToBaseClassTemplate(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildObjCExceptionDecl(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), ReportOriginalDSA(), ReportOverrides(), clang::Sema::RequireLiteralType(), rewriteToObjCInterfaceDecl(), clang::consumed::ConsumedAnalyzer::run(), clang::threadSafety::ThreadSafetyAnalyzer::runAnalysis(), clang::Sema::SetCtorInitializers(), clang::Sema::SetDeclDeleted(), clang::Sema::SetIvarInitializers(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::SetParamDefaultArgument(), clang::Sema::ShouldDeleteSpecialMember(), clang::Sema::SpecialMemberIsTrivial(), clang::Sema::startLambdaDefinition(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::Sema::SubstExceptionSpec(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::Sema::SubstParmVarDecl(), SuggestInitializationFixit(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformLambdaScope(), clang::threadSafety::SExprBuilder::translateAttrExpr(), clang::Sema::tryCaptureVariable(), TryDiagnoseProtectedAccess(), clang::Sema::UnifySection(), validateBoxingMethod(), clang::Sema::VerifyIntegerConstantExpression(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTNodeImporter::VisitDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl(), clang::Sema::WarnConflictingTypedMethods(), clang::Sema::WarnExactTypedMethods(), and warnOnLifetimeExtension().
SourceLocation clang::Decl::getLocEnd | ( | ) | const [inline] |
Reimplemented in clang::LinkageSpecDecl, and clang::ObjCMethodDecl.
Definition at line 362 of file DeclBase.h.
References clang::SourceRange::getEnd(), and getSourceRange().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::BuildCXXDefaultInitExpr(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), GenerateFixForUnusedDecl(), clang::LinkageSpecDecl::getLocEnd(), getValidSourceLocation(), HandleFunctionCall(), clang::Sema::InstantiateInClassInitializer(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), maybeEmitZeroInitializationFixit(), rewriteToNSEnumDecl(), rewriteToNSMacroDecl(), SuggestInitializationFixit(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTDeclWriter::VisitImportDecl().
SourceLocation clang::Decl::getLocStart | ( | ) | const [inline] |
Reimplemented in clang::TypeDecl, clang::ObjCPropertyImplDecl, clang::DeclaratorDecl, clang::NamespaceDecl, and clang::ObjCMethodDecl.
Definition at line 359 of file DeclBase.h.
References clang::SourceRange::getBegin(), and getSourceRange().
Referenced by clang::Sema::ActOnPropertyImplDecl(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), clang::Sema::checkObjCBridgeRelatedComponents(), clang::Sema::CheckObjCBridgeRelatedConversions(), CheckUnreachable(), clang::ento::PathDiagnosticLocation::createBegin(), clang::CodeGen::CodeGenModule::EmitDeferredUnusedCoverageMappings(), EvaluateDecl(), GenerateFixForUnusedDecl(), clang::ASTContext::getRawCommentForDeclNoCache(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCOwnershipAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), clang::ASTDeclWriter::VisitLabelDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().
unsigned Decl::getMaxAlignment | ( | ) | const |
getMaxAlignment - return the maximum alignment specified by attributes on this decl, 0 if there are none.
Definition at line 281 of file DeclBase.cpp.
References getASTContext(), getAttrs(), and hasAttrs().
Referenced by clang::ASTContext::getDeclAlign(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
Decl* clang::Decl::getMostRecentDecl | ( | ) | [inline] |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration).
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::ClassTemplateDecl, clang::CXXMethodDecl, clang::ClassTemplatePartialSpecializationDecl, clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl, and clang::NamedDecl.
Definition at line 806 of file DeclBase.h.
References getMostRecentDeclImpl().
Referenced by forAllLaterRedecls(), and clang::Sema::mergeDeclAttributes().
const Decl* clang::Decl::getMostRecentDecl | ( | ) | const [inline] |
Retrieve the most recent declaration that declares the same entity as this declaration (which may be this declaration).
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::ClassTemplateDecl, clang::CXXMethodDecl, clang::CXXRecordDecl, and clang::NamedDecl.
Definition at line 810 of file DeclBase.h.
References getMostRecentDeclImpl().
virtual Decl* clang::Decl::getMostRecentDeclImpl | ( | ) | [inline, protected, virtual] |
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.
Reimplemented in clang::TagDecl, clang::TypedefNameDecl, clang::FunctionDecl, and clang::VarDecl.
Definition at line 731 of file DeclBase.h.
Referenced by getMostRecentDecl().
Decl* clang::Decl::getNextDeclInContext | ( | ) | [inline] |
Definition at line 372 of file DeclBase.h.
References NextInContextAndBits.
Referenced by clang::DeclContext::addHiddenDecl(), IsTailPaddedMemberArray(), clang::DeclContext::localUncachedLookup(), and clang::DeclContext::decl_iterator::operator++().
const Decl* clang::Decl::getNextDeclInContext | ( | ) | const [inline] |
Definition at line 373 of file DeclBase.h.
References NextInContextAndBits.
virtual Decl* clang::Decl::getNextRedeclarationImpl | ( | ) | [inline, protected, virtual] |
Returns the next redeclaration or itself if this is the only decl.
Decl subclasses that can be redeclared should override this method so that Decl::redecl_iterator can iterate over them.
Reimplemented in clang::TagDecl, clang::TypedefNameDecl, clang::FunctionDecl, and clang::VarDecl.
Definition at line 723 of file DeclBase.h.
Referenced by clang::Decl::redecl_iterator::operator++().
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 755 of file DeclBase.cpp.
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), getNonClosureContext(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), and clang::CodeGen::CodeGenFunction::StartFunction().
const Decl* clang::Decl::getNonClosureContext | ( | ) | const [inline] |
Definition at line 390 of file DeclBase.h.
References getNonClosureContext().
Module* clang::Decl::getOwningModule | ( | ) | const [inline] |
Definition at line 641 of file DeclBase.h.
References isFromASTFile().
Referenced by clang::Sema::diagnoseTypo(), getDefiningModule(), and clang::ASTReader::getOwningModuleNameForDiagnostic().
unsigned clang::Decl::getOwningModuleID | ( | ) | const [inline] |
Retrieve the global ID of the module that owns this particular declaration.
Definition at line 630 of file DeclBase.h.
References isFromASTFile().
const DeclContext * Decl::getParentFunctionOrMethod | ( | ) | const |
If this decl is defined inside a function/method/block it returns the corresponding DeclContext, otherwise it returns null.
Definition at line 174 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::isTranslationUnit().
Referenced by basicGVALinkageForVariable(), clang::Sema::FinalizeDeclaration(), getParentFunctionOrMethod(), and isDefinedOutsideFunctionOrMethod().
DeclContext* clang::Decl::getParentFunctionOrMethod | ( | ) | [inline] |
Definition at line 704 of file DeclBase.h.
References getParentFunctionOrMethod().
Decl* clang::Decl::getPreviousDecl | ( | ) | [inline] |
Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::VarTemplateDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionTemplateDecl, and clang::CXXRecordDecl.
Definition at line 791 of file DeclBase.h.
References getPreviousDeclImpl().
Referenced by clang::Sema::ArgumentDependentLookup(), clang::Sema::CheckSpecializationInstantiationRedecl(), clang::DeclContext::collectAllContexts(), diagnoseBadDirectAccess(), DiagnoseNamespaceInlineMismatch(), clang::LocalInstantiationScope::findInstantiationOf(), forAllLaterRedecls(), getDeclForLocalLookup(), clang::Sema::InstantiateFunctionDefinition(), isFirstDecl(), setLocalExternDecl(), and setObjectOfFriendDecl().
const Decl* clang::Decl::getPreviousDecl | ( | ) | const [inline] |
Retrieve the most recent declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::VarTemplateDecl, clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, clang::FunctionTemplateDecl, and clang::CXXRecordDecl.
Definition at line 795 of file DeclBase.h.
References getPreviousDeclImpl().
virtual Decl* clang::Decl::getPreviousDeclImpl | ( | ) | [inline, protected, virtual] |
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Reimplemented in clang::TagDecl, clang::TypedefNameDecl, clang::FunctionDecl, and clang::VarDecl.
Definition at line 727 of file DeclBase.h.
Referenced by getPreviousDecl().
virtual SourceRange clang::Decl::getSourceRange | ( | ) | const [inline, virtual] |
Source range that this declaration covers.
Reimplemented in clang::ImportDecl, clang::BlockDecl, clang::FileScopeAsmDecl, clang::StaticAssertDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::NamespaceAliasDecl, clang::TagDecl, clang::UsingDirectiveDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::LinkageSpecDecl, clang::TypeDecl, clang::ObjCPropertyImplDecl, clang::EnumConstantDecl, clang::ObjCPropertyDecl, clang::FieldDecl, clang::ObjCProtocolDecl, clang::FunctionDecl, clang::ClassTemplateSpecializationDecl, clang::TemplateTemplateParmDecl, clang::ParmVarDecl, clang::NonTypeTemplateParmDecl, clang::TemplateTypeParmDecl, clang::VarDecl, clang::ObjCInterfaceDecl, clang::ObjCContainerDecl, clang::DeclaratorDecl, clang::NamespaceDecl, clang::LabelDecl, clang::ObjCMethodDecl, clang::TemplateDecl, clang::FriendDecl, and clang::AccessSpecDecl.
Definition at line 356 of file DeclBase.h.
References getLocation().
Referenced by clang::Sema::AddAlignValueAttr(), ConvertDeducedTemplateArgument(), getLocEnd(), getLocStart(), clang::TemplateDecl::getSourceRange(), and warnAboutAmbiguousFunction().
Definition at line 258 of file DeclBase.cpp.
References getDeclContext(), clang::DeclContext::getParent(), and clang::DeclContext::isTranslationUnit().
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinNewDeleteCall(), getASTContext(), getTranslationUnitDecl(), and clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().
const TranslationUnitDecl* clang::Decl::getTranslationUnitDecl | ( | ) | const [inline] |
Definition at line 395 of file DeclBase.h.
References getTranslationUnitDecl().
bool clang::Decl::hasAttr | ( | ) | const [inline] |
Definition at line 481 of file DeclBase.h.
References getAttrs(), and hasAttrs().
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFinishNamespaceDef(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPragmaWeakAlias(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddCFAuditedAttribute(), clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddOptnoneAttributeIfNoConflicts(), adjustGVALinkageForDLLAttribute(), AllowOverloadingOfFunction(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), assignInheritanceModel(), clang::Sema::AttachBaseSpecifiers(), basicGVALinkageForFunction(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildResolvedCallExpr(), clang::canCalleeThrow(), clang::CodeGen::CodeGenFunction::CanDevirtualizeMemberFunctionCall(), canRedefineFunction(), captureInBlock(), checkAcquireOrderAttrCommon(), clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), clang::comments::Sema::checkDeprecatedCommand(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckMain(), clang::Sema::CheckMessageArgumentTypes(), CheckNakedParmReference(), CheckNonNullArguments(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverrideControl(), CheckProtocolMethodDefs(), checkRecordTypeForCapability(), clang::Sema::CheckTransparentUnionArgumentConstraints(), checkTypedefTypeForCapability(), checkUndefinedButUsed(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CodeCompleteLambdaIntroducer(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), DiagnoseUninitializedUse(), clang::Sema::DiagnoseUnusedExprResult(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CodeGenModule::EmitGlobal(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), clang::Sema::FinalizeDeclaration(), findProtocolsWithExplicitImpls(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::ASTContext::getBlockVarCopyInits(), clang::CodeGen::CodeGenModule::getBuiltinLibFunction(), getCallingConventionForDecl(), clang::ASTContext::getDeclAlign(), clang::getDLLAttr(), GetFullTypeForDeclarator(), clang::CodeGen::CodeGenModule::GetGlobalVarAddressSpace(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), getTypeInfoLinkage(), clang::Sema::getUndefinedButUsed(), clang::CodeGen::CodeGenModule::getVTableLinkage(), hasDirectVisibilityAttribute(), hasObjCExceptionAttribute(), clang::Sema::IdentifyCUDATarget(), clang::InitializedEntity::InitializeParameter(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateVariableInitializer(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::ObjCInterfaceDecl::isArcWeakrefUnavailable(), clang::isBetterOverloadCandidate(), isBlockVarRef(), clang::Sema::isCopyElisionCandidate(), isFunctionDefinitionDiscarded(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), isTestingFunction(), IsTransparentUnionStandardConversion(), isVarDeclStrongDefinition(), isVariableCapturable(), clang::Sema::makeUnavailableInSystemHeader(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MatchTwoMethodDeclarations(), clang::Sema::MaybeBindToTemporary(), clang::RecordDecl::mayInsertExtraPadding(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::MergeFunctionDecl(), mergeParamDeclAttributes(), clang::ASTContext::mergeTransparentUnionType(), clang::Sema::MergeVarDecl(), clang::ASTContext::ObjCMethodsAreEqual(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::ProcessPropertyDecl(), pushTemporaryCleanup(), clang::threadSafety::ThreadSafetyAnalyzer::runAnalysis(), clang::CodeGen::CodeGenModule::setAliasAttributes(), clang::ASTContext::setBlockVarCopyInits(), clang::CodeGen::CodeGenModule::SetCommonAttributes(), setLinkageAndVisibilityForGV(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), shouldConsiderTemplateVisibility(), ShouldDiagnoseUnusedDecl(), shouldExtendReceiverForInnerPointerMessage(), clang::CodeGen::CodeGenFunction::ShouldInstrumentFunction(), clang::MangleContext::shouldMangleDeclName(), ShouldUseExternalRTTIDescriptor(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), SuggestInitializationFixit(), clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(), useFirstFieldIfTransparentUnion(), useInlineVisibilityHidden(), and clang::Sema::WarnExactTypedMethods().
bool clang::Decl::hasAttrs | ( | ) | const [inline] |
Definition at line 421 of file DeclBase.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFields(), addAttr(), attr_begin(), attr_end(), AttributesMatch(), clang::Sema::BuildReturnStmt(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckEnableIf(), clang::Sema::CheckFieldDecl(), checkNewAttributesAfterDef(), clang::Sema::CheckVariableDeclarationType(), getAttr(), clang::threadSafety::ThreadSafetyAnalyzer::getEdgeLockset(), getMaxAlignment(), hasAttr(), clang::isBetterOverloadCandidate(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeDeclAttributes(), mergeParamDeclAttributes(), clang::threadSafety::ThreadSafetyAnalyzer::runAnalysis(), clang::MangleContext::shouldMangleDeclName(), clang::threadSafety::BuildLockset::VisitCallExpr(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::threadSafety::BuildLockset::VisitDeclStmt(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
virtual bool clang::Decl::hasBody | ( | ) | const [inline, virtual] |
Returns true if this Decl
represents a declaration for a body of code, such as a function or method definition. 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 823 of file DeclBase.h.
References getBody().
Referenced by clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), hasImplicitBody(), and clang::ento::CheckerManager::runCheckersOnASTBody().
bool clang::Decl::hasCachedLinkage | ( | ) | const [inline, protected] |
Definition at line 349 of file DeclBase.h.
References CacheValidAndLinkage.
Referenced by clang::LinkageComputer::getLVForDecl(), clang::NamedDecl::hasLinkageBeenComputed(), and clang::NamedDecl::isLinkageValid().
bool clang::Decl::hasTagIdentifierNamespace | ( | ) | const [inline] |
Definition at line 656 of file DeclBase.h.
References getIdentifierNamespace(), and isTagIdentifierNamespace().
Referenced by clang::StoredDeclsList::AddSubsequentDecl().
bool clang::Decl::isCanonicalDecl | ( | ) | const [inline] |
Whether this particular Decl is a canonical one.
Definition at line 716 of file DeclBase.h.
References getCanonicalDecl().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::ASTContext::addOverriddenMethod(), clang::CXXMethodDecl::addOverriddenMethod(), clang::ClassTemplateDecl::AddPartialSpecialization(), clang::VarTemplateDecl::AddPartialSpecialization(), clang::ClassTemplateDecl::AddSpecialization(), clang::VarTemplateDecl::AddSpecialization(), clang::ASTDeclWriter::VisitClassTemplateSpecializationDecl(), clang::ASTDeclReader::VisitClassTemplateSpecializationDeclImpl(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::ASTDeclReader::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTDeclReader::VisitFunctionDecl(), clang::ASTDeclWriter::VisitVarTemplateSpecializationDecl(), and clang::ASTDeclReader::VisitVarTemplateSpecializationDeclImpl().
bool clang::Decl::isDefinedOutsideFunctionOrMethod | ( | ) | const [inline] |
isDefinedOutsideFunctionOrMethod - This predicate returns true if this scoped decl is defined outside the current function or method. This is roughly global variables and functions, but also handles enums (which could be defined inside or outside a function etc).
Definition at line 697 of file DeclBase.h.
References getParentFunctionOrMethod().
Referenced by clang::Sema::InstantiateClass(), clang::Sema::LookupInObjCMethod(), and LookupPotentialTypoResult().
bool clang::Decl::isDeprecated | ( | std::string * | Message = nullptr | ) | const [inline] |
Determine whether this declaration is marked 'deprecated'.
Message | If non-NULL and the declaration is deprecated, this will be set to the message describing why the declaration was deprecated (which may be empty). |
Definition at line 587 of file DeclBase.h.
References clang::AR_Deprecated, and getAvailability().
Referenced by clang::Sema::addMethodToGlobalList(), DiagnoseObjCImplementedDeprecations(), and isDeclDeprecated().
bool clang::Decl::isFirstDecl | ( | ) | const [inline] |
True if this is the first declaration in its redeclaration chain.
Definition at line 800 of file DeclBase.h.
References getPreviousDecl().
bool clang::Decl::isFromASTFile | ( | ) | const [inline] |
Determine whether this declaration came from an AST file (such as a precompiled header or module) rather than having been parsed.
Definition at line 618 of file DeclBase.h.
References FromASTFile.
Referenced by clang::ASTWriter::AddedCXXImplicitMember(), clang::ASTWriter::AddedCXXTemplateSpecialization(), clang::ASTContext::addedLocalImportDecl(), clang::ASTWriter::AddedObjCCategoryToInterface(), clang::ASTWriter::AddedObjCPropertyInClassExtension(), clang::ASTWriter::AddedVisibleDecl(), clang::ASTUnit::addFileLevelDecl(), clang::DeclContext::addHiddenDecl(), clang::ASTWriter::CompletedImplicitDefinition(), clang::ASTWriter::DeclarationMarkedOpenMPThreadPrivate(), clang::ASTWriter::DeclarationMarkedUsed(), clang::ASTWriter::DeducedReturnType(), clang::ASTWriter::FunctionDefinitionInstantiated(), getDeclForLocalLookup(), getDeclForMerging(), clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), getGlobalID(), getOwningModule(), clang::ASTReader::getOwningModuleFile(), getOwningModuleID(), clang::Sema::InstantiateFunctionDefinition(), clang::StoredDeclsList::removeExternalDecls(), clang::ASTWriter::ResolvedExceptionSpec(), setOwningModuleID(), clang::ASTWriter::StaticDataMemberInstantiated(), and clang::ASTDeclWriter::VisitNamespaceDecl().
bool clang::Decl::isFunctionOrFunctionTemplate | ( | ) | const [inline] |
Whether this declaration is a function or function template.
Definition at line 849 of file DeclBase.h.
Referenced by clang::Sema::ClassifyName().
bool clang::Decl::isImplicit | ( | ) | const [inline] |
isImplicit - Indicates whether the declaration was implicitly generated by the implementation. If false, this declaration was written explicitly in the source code.
Definition at line 497 of file DeclBase.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXMemberDeclarator(), clang::ASTWriter::AddedCXXImplicitMember(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::Sema::BuildCXXNew(), BuildImplicitMemberInitializer(), clang::Sema::CheckDestructor(), checkDLLAttributeRedeclaration(), clang::Sema::CheckObjCMethodOverrides(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), DiagnoseBadTarget(), diagnoseDeprecatedCopyOperation(), clang::CodeGen::CodeGenFunction::EmitDestructorBody(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), clang::Sema::FindAllocationFunctions(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::ASTContext::getBuiltinVaListDecl(), clang::ObjCMethodDecl::getNumSelectorLocs(), clang::ASTContext::getRawCommentForDeclNoCache(), clang::ObjCMethodDecl::getSelectorStartLoc(), hasImplicitBody(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::Sema::IdentifyCUDATarget(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::ObjCInterfaceDecl::isImplicitInterfaceDecl(), clang::RecordDecl::isInjectedClassName(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), clang::ObjCInterfaceDecl::lookupMethod(), clang::Sema::MergeFunctionDecl(), RedeclForcesDefC99(), clang::ObjCMethodDecl::setMethodParams(), clang::Sema::ShouldDeleteSpecialMember(), clang::TreeTransform< Derived >::TransformLambdaScope(), clang::RecursiveASTVisitor< Derived >::TraverseDecl(), clang::Sema::UseArgumentDependentLookup(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
bool Decl::isInAnonymousNamespace | ( | ) | const |
Definition at line 243 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::getParent().
Referenced by getLVForNamespaceScopeDecl().
bool clang::Decl::isInIdentifierNamespace | ( | unsigned | NS | ) | const [inline] |
Definition at line 651 of file DeclBase.h.
References getIdentifierNamespace().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::LookupResult::getAcceptableDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
bool Decl::isInStdNamespace | ( | ) | const |
Definition at line 254 of file DeclBase.cpp.
References getDeclContext(), and clang::DeclContext::isStdNamespace().
Referenced by clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), IsStdString(), and clang::consumed::ConsumedStmtVisitor::VisitCallExpr().
bool clang::Decl::isInvalidDecl | ( | ) | const [inline] |
Definition at line 492 of file DeclBase.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnCXXExitDeclInitializer(), clang::Sema::ActOnCXXForRangeStmt(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishCXXMemberDecls(), clang::Sema::ActOnFinishDelayedCXXMethodDeclaration(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnObjCAtCatchStmt(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclaratorGroup(), BuildImplicitMemberInitializer(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVarTemplateInstantiation(), CastToDerivedClass(), checkARCPropertyDecl(), checkARCPropertyImpl(), CheckArityMismatch(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckConditionVariable(), CheckConstexprCtorInitializer(), CheckConstexprFunction(), clang::Sema::CheckConstructor(), clang::Sema::CheckCXXDefaultArguments(), clang::Sema::CheckFieldDecl(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CheckPureMethod(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckVariableDeclaration(), clang::Sema::CheckVariableDeclarationType(), CollectFieldInitializer(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpec(), clang::Sema::ComputeDefaultedDefaultCtorExceptionSpec(), clang::Sema::ComputeDefaultedDtorExceptionSpec(), clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedMoveCtorExceptionSpec(), clang::Sema::ComputeInheritingCtorExceptionSpec(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), DelegatingCycleHelper(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::Sema::DiagnoseHiddenVirtualMethods(), DiagnoseReinterpretUpDownCast(), clang::Sema::DiagnoseUnimplementedProperties(), DiagnoseUninstantiableTemplate(), clang::Sema::FinalizeDeclaration(), clang::Sema::FinalizeVarWithDestructor(), findCompleteObject(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ASTContext::getASTRecordLayout(), clang::ASTContext::getCommentForDecl(), clang::ASTContext::getDeclAlign(), clang::LinkageComputer::getLVForDecl(), clang::Sema::getUndefinedButUsed(), HandleClassZeroInitialization(), HandleConstructorCall(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), HandleLValueBase(), HandleLValueDirectBase(), HandleLValueMember(), clang::Sema::HandleMSProperty(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateMemInitializers(), clang::Sema::InstantiateVariableDefinition(), clang::Sema::IsDerivedFrom(), clang::FunctionDecl::isImplicitlyInstantiable(), IsInitializerListConstructorConversion(), isNonPlacementDeallocationFunction(), IsUserDefinedConversion(), LookupCopyAndMoveConstructors(), clang::Sema::LookupInObjCMethod(), clang::Sema::LookupLiteralOperator(), LookupMemberExpr(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), MatchesFriend(), clang::CXXRecordDecl::mayBeAbstract(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclTypes(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::PerformPendingInstantiations(), clang::Sema::PopParsingDeclaration(), clang::Sema::ProcessPropertyDecl(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), ResolveConstructorOverload(), clang::LookupResult::resolveKind(), clang::Sema::SetDeclDefaulted(), clang::Sema::SetIvarInitializers(), clang::Sema::ShouldDeleteSpecialMember(), ShouldDiagnoseUnusedDecl(), ShouldWarnAboutMissingPrototype(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::Sema::SubstDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), clang::TreeTransform< Derived >::TransformLambdaScope(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), TryRefInitWithConversionFunction(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
bool clang::Decl::isLocalExternDecl | ( | ) | [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 885 of file DeclBase.h.
References IDNS_LocalExtern.
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildVariableInstantiation(), checkDLLAttributeRedeclaration(), clang::Sema::HandleDeclarator(), clang::Sema::HandleDelayedAccessCheck(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
bool clang::Decl::isModulePrivate | ( | ) | const [inline] |
Whether this declaration was marked as being private to the module in which it was defined.
Definition at line 546 of file DeclBase.h.
References ModulePrivateFlag, and NextInContextAndBits.
Referenced by clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclReader::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
bool Decl::isOutOfLine | ( | ) | const [virtual] |
Determine whether this declaration is declared out of line (outside its semantic context).
Reimplemented in clang::FunctionDecl, and clang::VarDecl.
Definition at line 43 of file Decl.cpp.
References clang::DeclContext::Equals(), getDeclContext(), and getLexicalDeclContext().
Referenced by clang::Sema::ActOnCXXEnterDeclInitializer(), clang::Sema::ActOnCXXExitDeclInitializer(), clang::VarDecl::isOutOfLine(), clang::FunctionDecl::isOutOfLine(), clang::Sema::PushOnScopeChains(), and clang::ASTDeclWriter::VisitDecl().
bool Decl::isParameterPack | ( | ) | const |
Whether this declaration is a parameter pack.
Reimplemented in clang::ParmVarDecl, clang::TemplateTemplateParmDecl, clang::NonTypeTemplateParmDecl, and clang::TemplateTypeParmDecl.
Definition at line 155 of file DeclBase.cpp.
References isTemplateParameterPack().
Referenced by clang::Sema::ActOnSizeofParameterPackExpr(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::FinishTemplateArgumentDeduction(), isSameAsPrimaryTemplate(), and MatchTemplateParameterKind().
bool Decl::isReferenced | ( | ) | const |
Whether any declaration of this entity was referenced.
Definition at line 315 of file DeclBase.cpp.
References redecls().
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::BuildVariableInstantiation(), clang::Sema::DiagnoseUnusedBackingIvarInAccessor(), ShouldDiagnoseUnusedDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), and clang::ASTDeclWriter::VisitVarDecl().
static bool clang::Decl::isTagIdentifierNamespace | ( | unsigned | NS | ) | [inline, static] |
Definition at line 659 of file DeclBase.h.
References IDNS_Tag, IDNS_TagFriend, and IDNS_Type.
Referenced by hasTagIdentifierNamespace().
bool Decl::isTemplateDecl | ( | ) | const |
returns true if this declaration is a template
Definition at line 170 of file DeclBase.cpp.
bool clang::Decl::isTemplateParameter | ( | ) | const [inline] |
isTemplateParameter - Determines whether this declaration is a template parameter.
Definition at line 1681 of file DeclBase.h.
References getKind().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTag(), clang::Sema::CheckClassTemplate(), clang::Sema::DiagnoseTemplateParameterShadow(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), maybeDiagnoseTemplateParameterShadow(), shouldBeHidden(), and clang::ASTDeclReader::VisitDecl().
bool Decl::isTemplateParameterPack | ( | ) | const |
isTemplateParameter - Determines whether this declaration is a template parameter pack.
Definition at line 143 of file DeclBase.cpp.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::FinishTemplateArgumentDeduction(), isParameterPack(), MatchTemplateParameterKind(), clang::TemplateParameterList::TemplateParameterList(), and clang::ASTDeclReader::VisitDecl().
bool clang::Decl::isThisDeclarationReferenced | ( | ) | const [inline] |
Whether this declaration was referenced. This should not be relied upon for anything other than debugging.
Definition at line 524 of file DeclBase.h.
bool clang::Decl::isTopLevelDeclInObjCContainer | ( | ) | const [inline] |
Whether this declaration is a top-level declaration (function, global variable, etc.) that is lexically inside an objc container definition.
Definition at line 531 of file DeclBase.h.
References NextInContextAndBits, and TopLevelDeclInObjCContainerFlag.
Referenced by clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
bool clang::Decl::isUnavailable | ( | std::string * | Message = nullptr | ) | const [inline] |
Determine whether this declaration is marked 'unavailable'.
Message | If non-NULL and the declaration is unavailable, this will be set to the message describing why the declaration was made unavailable (which may be empty). |
Definition at line 596 of file DeclBase.h.
References clang::AR_Unavailable, and getAvailability().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::addMethodToGlobalList(), isDeclUnavailable(), and clang::Sema::isFunctionConsideredUnavailable().
bool Decl::isUsed | ( | bool | CheckUsedAttr = true | ) | const |
Whether this declaration was used, meaning that a definition is required.
CheckUsedAttr | When true, also consider the "used" attribute (in addition to the "used" bit set by setUsed() ) when determining whether the function is used. |
Definition at line 294 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnPragmaUnused(), clang::Sema::BuildVariableInstantiation(), checkDLLAttributeRedeclaration(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDecl(), PerformConstructorInitialization(), clang::CodeGen::CodeGenFunction::PushDestructorCleanup(), ShouldDiagnoseUnusedDecl(), ShouldRemoveFromUnused(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::ASTDeclWriter::VisitDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::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 490 of file DeclBase.cpp.
References clang::AR_NotYetIntroduced, attrs(), canBeWeakImported(), CheckAvailability(), and getASTContext().
Referenced by clang::ValueDecl::isWeak(), and setLinkageAndVisibilityForGV().
void Decl::markUsed | ( | ASTContext & | C | ) |
Mark the declaration used, in the sense of odr-use.
This notifies any mutation listeners in addition to setting a bit indicating the declaration is used.
Definition at line 305 of file DeclBase.cpp.
References clang::ASTMutationListener::DeclarationMarkedUsed(), and clang::ASTContext::getASTMutationListener().
Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnGotoStmt(), addAsFieldToClosureType(), clang::Sema::BuildBlockForLambdaConversion(), captureInCapturedRegion(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), clang::Sema::GetOrCreateMSAsmLabel(), and clang::MarkVarDeclODRUsed().
void * Decl::operator new | ( | std::size_t | Size, |
const ASTContext & | Ctx, | ||
unsigned | ID, | ||
std::size_t | Extra = 0 |
||
) | [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 48 of file DeclBase.cpp.
References clang::ASTContext::Allocate().
Referenced by operator new().
void * Decl::operator new | ( | std::size_t | Size, |
const ASTContext & | Ctx, | ||
DeclContext * | Parent, | ||
std::size_t | Extra = 0 |
||
) | [protected] |
Allocate memory for a non-deserialized declaration.
Definition at line 66 of file DeclBase.cpp.
References clang::DeclContext::getParentASTContext(), and operator new().
void Decl::print | ( | raw_ostream & | Out, |
unsigned | Indentation = 0 , |
||
bool | PrintInstantiation = false |
||
) | const |
Definition at line 94 of file DeclPrinter.cpp.
References getASTContext().
Referenced by clang::LocationContext::dumpStack(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), print_block(), and printGroup().
void Decl::print | ( | raw_ostream & | Out, |
const PrintingPolicy & | Policy, | ||
unsigned | Indentation = 0 , |
||
bool | PrintInstantiation = false |
||
) | const |
Definition at line 99 of file DeclPrinter.cpp.
void Decl::printGroup | ( | Decl ** | Begin, |
unsigned | NumDecls, | ||
raw_ostream & | Out, | ||
const PrintingPolicy & | Policy, | ||
unsigned | Indentation = 0 |
||
) | [static] |
Definition at line 137 of file DeclPrinter.cpp.
References clang::TagDecl::isCompleteDefinition(), print(), clang::PrintingPolicy::SuppressSpecifiers, and clang::PrintingPolicy::SuppressTag.
void Decl::PrintStats | ( | ) | [static] |
Definition at line 111 of file DeclBase.cpp.
Referenced by clang::ParseAST().
redecl_range clang::Decl::redecls | ( | ) | const [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 780 of file DeclBase.h.
References redecls_begin(), and redecls_end().
Referenced by compareDeclarations(), findAcceptableDecl(), clang::LinkageComputer::getLVForDecl(), clang::ASTContext::getRawCommentForAnyRedecl(), and isReferenced().
redecl_iterator clang::Decl::redecls_begin | ( | ) | const [inline] |
Definition at line 784 of file DeclBase.h.
Referenced by redecls().
redecl_iterator clang::Decl::redecls_end | ( | ) | const [inline] |
Definition at line 787 of file DeclBase.h.
Referenced by redecls().
void clang::Decl::setAccess | ( | AccessSpecifier | AS | ) | [inline] |
Definition at line 405 of file DeclBase.h.
References Access.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnVarTemplateSpecialization(), addAsFieldToClosureType(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::buildInitCaptureField(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::BuildVariableInstantiation(), captureInCapturedRegion(), captureThis(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckOMPThreadPrivateDecl(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::ASTContext::getBlockDescriptorExtendedType(), clang::ASTContext::getBlockDescriptorType(), clang::ASTContext::getCFConstantStringType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::Sema::HandleMSProperty(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), InjectAnonymousStructOrUnionMembers(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::MergeVarDecl(), setInvalidDecl(), clang::Sema::SetMemberAccessSpecifier(), clang::Sema::startLambdaDefinition(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclReader::VisitDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitVarDecl(), and clang::ASTNodeImporter::VisitVarTemplateDecl().
void clang::Decl::setAttrs | ( | const AttrVec & | Attrs | ) | [inline] |
Definition at line 422 of file DeclBase.h.
References getASTContext().
Referenced by addAttr(), clang::Sema::mergeDeclAttributes(), and mergeParamDeclAttributes().
void clang::Decl::setCachedLinkage | ( | Linkage | L | ) | const [inline, protected] |
Definition at line 345 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 216 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMethodDeclaration(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::SubstParmVarDecl(), and clang::ASTDeclReader::VisitDecl().
void clang::Decl::setImplicit | ( | bool | I = true | ) | [inline] |
Definition at line 498 of file DeclBase.h.
Referenced by clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartNamespaceDef(), addAsFieldToClosureType(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::BuildAnonymousStructOrUnion(), clang::ASTContext::buildImplicitRecord(), clang::ASTContext::buildImplicitTypedef(), clang::Sema::buildInitCaptureField(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildParmVarDeclForTypedef(), BuildVarDecl(), captureInCapturedRegion(), captureThis(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateCapturedStmtRecordDecl(), clang::ImportDecl::CreateImplicit(), clang::CXXRecordDecl::CreateLambda(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::getOrCreateStdNamespace(), clang::Sema::ImplicitlyDefineFunction(), InjectAnonymousStructOrUnionMembers(), clang::Sema::LazilyCreateBuiltin(), clang::Sema::MergeFunctionDecl(), clang::ASTDeclReader::VisitDecl(), and clang::ASTNodeImporter::VisitFieldDecl().
void Decl::setInvalidDecl | ( | bool | Invalid = true | ) |
setInvalidDecl - Indicates the Decl had a semantic error. This allows for graceful error recovery.
Definition at line 86 of file DeclBase.cpp.
References clang::AS_public, and setAccess().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnAtEnd(), clang::Sema::ActOnBaseSpecifier(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCapturedRegionError(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnCXXForRangeStmt(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnIvar(), clang::Sema::ActOnLambdaError(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnParamDefaultArgument(), clang::Sema::ActOnParamDefaultArgumentError(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagDefinitionError(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), checkAttributesAfterMerging(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckConstructor(), checkDLLAttributeRedeclaration(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckForFunctionRedefinition(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckInheritingConstructorUsingDecl(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMSVCRTEntryPoint(), checkNewAttributesAfterDef(), clang::Sema::CheckObjCDeclScope(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckParameter(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CheckVarTemplateId(), CreateNewFunctionDecl(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), DiagnoseInvalidRedeclaration(), DiagnoseUninstantiableTemplate(), clang::Sema::FinalizeDeclaration(), FinishForRangeVarDecl(), clang::Sema::FinishTemplateArgumentDeduction(), GetFullTypeForDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateInClassInitializer(), clang::Sema::InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::InstantiateVariableDefinition(), clang::Sema::InstantiateVariableInitializer(), clang::Sema::isIncompatibleTypedef(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::MergeVarDeclTypes(), clang::Sema::ParseTypedefDecl(), clang::Sema::ProcessDeclAttributeList(), clang::Sema::SetCtorInitializers(), clang::Sema::SetDeclDeleted(), clang::Sema::SetParamDefaultArgument(), clang::Sema::SubstBaseSpecifiers(), clang::ASTDeclReader::VisitDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
void clang::Decl::setIsUsed | ( | ) | [inline] |
Set whether the declaration is used, in the sense of odr-use.
This should only be used immediately after creating a declaration.
Definition at line 511 of file DeclBase.h.
References Used.
Referenced by clang::Sema::BuildVariableInstantiation(), clang::Sema::MergeCompatibleFunctionDecls(), and clang::Sema::MergeVarDecl().
void Decl::setLexicalDeclContext | ( | DeclContext * | DC | ) |
Definition at line 220 of file DeclBase.cpp.
References getASTContext(), getDeclContext(), and getLexicalDeclContext().
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnLambdaExpr(), clang::Sema::ActOnProperty(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), clang::ObjCImplDecl::addClassMethod(), clang::ObjCImplDecl::addInstanceMethod(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckImplementationIvars(), clang::Sema::CheckTemplateIdType(), CreateNewFunctionDecl(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::ProcessPropertyDecl(), clang::Sema::startLambdaDefinition(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitNamespaceDecl(), clang::ASTNodeImporter::VisitObjCCategoryDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTNodeImporter::VisitObjCInterfaceDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitObjCProtocolDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
void clang::Decl::setLocalExternDecl | ( | ) | [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 869 of file DeclBase.h.
References getIdentifierNamespace(), getPreviousDecl(), IDNS_LocalExtern, IDNS_Ordinary, and IDNS_OrdinaryFriend.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildVariableInstantiation(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().
void clang::Decl::setLocation | ( | SourceLocation | L | ) | [inline] |
Definition at line 367 of file DeclBase.h.
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnLabelStmt(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckMemberSpecialization(), clang::Sema::GetOrCreateMSAsmLabel(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::AccessSpecDecl::setAccessSpecifierLoc(), and clang::ASTDeclReader::VisitDecl().
void clang::Decl::setModulePrivate | ( | bool | MP = true | ) | [inline, protected] |
Specify whether this declaration was marked as being private to the module in which it was defined.
Definition at line 553 of file DeclBase.h.
References ModulePrivateFlag, and NextInContextAndBits.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIvar(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckClassTemplate(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), clang::Sema::ParseTypedefDecl(), and clang::ASTDeclReader::VisitDecl().
void clang::Decl::setNonMemberOperator | ( | ) | [inline] |
Specifies that this declaration is a C++ overloaded non-member.
Definition at line 944 of file DeclBase.h.
References getKind(), IDNS_NonMemberOperator, and IDNS_Ordinary.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
void clang::Decl::setObjectOfFriendDecl | ( | bool | PerformFriendInjection = false | ) | [inline] |
Changes the namespace of this declaration to reflect that it's the object of a friend declaration.
These declarations appear in the lexical context of the friending class, but in the semantic context of the actual entity. This property applies only to a specific decl object; other redeclarations of the same entity may not (and probably don't) share this property.
Definition at line 896 of file DeclBase.h.
References getIdentifierNamespace(), getPreviousDecl(), IDNS_LocalExtern, 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::TemplateDeclInstantiator::VisitFunctionDecl().
void clang::Decl::setOwningModuleID | ( | unsigned | ID | ) | [inline, protected] |
Set the owning module ID.
Definition at line 563 of file DeclBase.h.
References isFromASTFile().
Referenced by clang::ASTDeclReader::VisitDecl().
void clang::Decl::setReferenced | ( | bool | R = true | ) | [inline] |
Definition at line 526 of file DeclBase.h.
Referenced by addAsFieldToClosureType(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildVariableInstantiation(), captureInCapturedRegion(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), DoMarkVarDeclReferenced(), clang::Sema::MarkAnyDeclReferenced(), clang::Sema::MarkFunctionReferenced(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), and clang::ASTDeclReader::VisitDecl().
void clang::Decl::setTopLevelDeclInObjCContainer | ( | bool | V = true | ) | [inline] |
Definition at line 535 of file DeclBase.h.
References NextInContextAndBits, and TopLevelDeclInObjCContainerFlag.
Referenced by clang::Sema::ActOnDeclarator(), clang::Sema::ActOnFinishObjCImplementation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTagFinishDefinition(), and clang::ASTDeclReader::VisitDecl().
specific_attr_iterator<T> clang::Decl::specific_attr_begin | ( | ) | const [inline] |
Definition at line 470 of file DeclBase.h.
References attr_begin().
Referenced by clang::Sema::IsOverload().
specific_attr_iterator<T> clang::Decl::specific_attr_end | ( | ) | const [inline] |
Definition at line 474 of file DeclBase.h.
References attr_end().
Referenced by clang::Sema::IsOverload().
llvm::iterator_range<specific_attr_iterator<T> > clang::Decl::specific_attrs | ( | ) | const [inline] |
Definition at line 464 of file DeclBase.h.
Referenced by clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), AttrFilter(), clang::Sema::CheckAlignasUnderalignment(), CheckNonNullArguments(), clang::CodeCompletionResult::CreateCodeCompletionString(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::Sema::FinalizeDeclaration(), getNonNullAttr(), getPrintfFormatArgumentNum(), getVisibilityOf(), handleAnnotateAttr(), handleOwnershipAttr(), mergeAlignedAttrs(), clang::Sema::mergeDeclAttributes(), clang::Sema::mergeFormatAttr(), and mergeParamDeclAttributes().
void Decl::updateOutOfDate | ( | IdentifierInfo & | II | ) | const [protected] |
Update a potentially out-of-date declaration.
Definition at line 44 of file DeclBase.cpp.
References getASTContext(), clang::ASTContext::getExternalSource(), and clang::ExternalASTSource::updateOutOfDateIdentifier().
Referenced by clang::TagDecl::getDefinition(), clang::ObjCInterfaceDecl::hasDefinition(), and clang::ObjCProtocolDecl::hasDefinition().
friend class ASTDeclReader [friend] |
Reimplemented in clang::ImportDecl, clang::CapturedDecl, clang::MSPropertyDecl, clang::StaticAssertDecl, clang::EnumDecl, clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::VarTemplateDecl, clang::NamespaceAliasDecl, clang::UsingDirectiveDecl, clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::ObjCPropertyImplDecl, clang::CXXConversionDecl, clang::IndirectFieldDecl, clang::CXXDestructorDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::ClassScopeFunctionSpecializationDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::ObjCImplementationDecl, clang::FriendTemplateDecl, clang::ClassTemplateDecl, clang::ObjCCategoryImplDecl, clang::ObjCCategoryDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXRecordDecl, clang::ObjCProtocolDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCInterfaceDecl, clang::TemplateTemplateParmDecl, clang::NonTypeTemplateParmDecl, clang::FunctionTemplateDecl, clang::VarDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::ObjCMethodDecl, clang::NamespaceDecl, clang::FriendDecl, and clang::OMPThreadPrivateDecl.
Definition at line 288 of file DeclBase.h.
friend class ASTDeclWriter [friend] |
Reimplemented in clang::CapturedDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::VarTemplateDecl, clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::ClassScopeFunctionSpecializationDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::ObjCImplementationDecl, clang::ClassTemplateDecl, clang::ObjCCategoryImplDecl, clang::ObjCCategoryDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXRecordDecl, clang::ObjCProtocolDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCInterfaceDecl, clang::TemplateTemplateParmDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::ObjCMethodDecl, clang::NamespaceDecl, and clang::FriendDecl.
Definition at line 287 of file DeclBase.h.
friend class ASTReader [friend] |
Reimplemented in clang::ImportDecl, clang::CXXRecordDecl, clang::ObjCProtocolDecl, clang::ObjCInterfaceDecl, and clang::RedeclarableTemplateDecl.
Definition at line 289 of file DeclBase.h.
friend class CXXClassMemberWrapper [friend] |
Definition at line 270 of file DeclBase.h.
friend class DeclContext [friend] |
Reimplemented in clang::RecordDecl, clang::UsingDirectiveDecl, and clang::CXXRecordDecl.
Definition at line 205 of file DeclBase.h.
friend class LinkageComputer [friend] |
Definition at line 290 of file DeclBase.h.
friend class Redeclarable [friend] |
Definition at line 292 of file DeclBase.h.
unsigned clang::Decl::Access [protected] |
Access - Used by C++ decls for the access specifier.
Definition at line 269 of file DeclBase.h.
Referenced by getAccess(), getAccessUnsafe(), and setAccess().
unsigned clang::Decl::CacheValidAndLinkage [mutable, protected] |
If 0, we have not computed the linkage of this declaration. Otherwise, it is the linkage + 1.
Definition at line 285 of file DeclBase.h.
Referenced by getCachedLinkage(), hasCachedLinkage(), and setCachedLinkage().
unsigned clang::Decl::FromASTFile [protected] |
Whether this declaration was loaded from an AST file.
Definition at line 273 of file DeclBase.h.
Referenced by isFromASTFile(), and clang::ASTDeclReader::VisitDecl().
unsigned clang::Decl::Hidden [protected] |
Whether this declaration is hidden from normal name lookup, e.g., because it is was loaded from an AST file is either module-private or because its submodule has not been made visible.
Definition at line 278 of file DeclBase.h.
Referenced by clang::CXXRecordDecl::getFinalOverriders(), clang::NamedDecl::isHidden(), clang::CXXRecordDecl::lookupInBases(), clang::ASTReader::makeNamesVisible(), clang::NamedDecl::setHidden(), and clang::ASTDeclReader::VisitDecl().
unsigned clang::Decl::IdentifierNamespace [protected] |
IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
Definition at line 281 of file DeclBase.h.
llvm::PointerIntPair<Decl *, 2, unsigned> clang::Decl::NextInContextAndBits [protected] |
The next declaration within the same lexical DeclContext. These pointers form the linked list that is traversed via DeclContext's decls_begin()/decls_end().
The extra two bits are used for the TopLevelDeclInObjCContainer and ModulePrivate bits.
Definition at line 202 of file DeclBase.h.
Referenced by clang::DeclContext::addHiddenDecl(), clang::DeclContext::BuildDeclChain(), clang::DeclContext::containsDecl(), getNextDeclInContext(), clang::DeclContext::isDeclInLexicalTraversal(), isModulePrivate(), isTopLevelDeclInObjCContainer(), clang::DeclContext::removeDecl(), setModulePrivate(), and setTopLevelDeclInObjCContainer().