class FriendDecl
Declaration
class FriendDecl : public Decl, private TrailingObjects { /* full declaration omitted */ };
Description
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type. For example: The semantic context of a friend decl is its declaring class.
Declared at: clang/include/clang/AST/DeclFriend.h:53
Inherits from: Decl, TrailingObjects
Member Variables
- private clang::FriendDecl::FriendUnion Friend
- private clang::LazyDeclPtr NextFriend
- private clang::SourceLocation FriendLoc
- private unsigned int UnsupportedFriend
- True if this 'friend' declaration is unsupported. Eventually we will support every possible friend declaration, but for now we silently ignore some and set this flag to authorize all access.
- private unsigned int NumTPLists
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::FriendDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation L, clang::FriendDecl::FriendUnion Friend_, clang::SourceLocation FriendL, ArrayRef<clang::TemplateParameterList *> FriendTypeTPLists = None)
- public static clang::FriendDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID, unsigned int FriendTypeNumTPLists)
- private FriendDecl(clang::DeclContext * DC, clang::SourceLocation L, clang::FriendDecl::FriendUnion Friend, clang::SourceLocation FriendL, ArrayRef<clang::TemplateParameterList *> FriendTypeTPLists)
- private FriendDecl(clang::Decl::EmptyShell Empty, unsigned int NumFriendTypeTPLists)
- private virtual void anchor()
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public clang::NamedDecl * getFriendDecl() const
- public clang::SourceLocation getFriendLoc() const
- public clang::TypeSourceInfo * getFriendType() const
- public unsigned int getFriendTypeNumTemplateParameterLists() const
- public clang::TemplateParameterList * getFriendTypeTemplateParameterList(unsigned int N) const
- private clang::FriendDecl * getNextFriend()
- private clang::FriendDecl * getNextFriendSlowCase()
- public clang::SourceRange getSourceRange() const
- public bool isUnsupportedFriend() const
- public void setUnsupportedFriend(bool Unsupported)
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::FriendDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::FriendDecl::FriendUnion Friend_,
clang::SourceLocation FriendL,
ArrayRef<clang::TemplateParameterList*>
FriendTypeTPLists = None)
static clang::FriendDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
clang::FriendDecl::FriendUnion Friend_,
clang::SourceLocation FriendL,
ArrayRef<clang::TemplateParameterList*>
FriendTypeTPLists = None)
Declared at: clang/include/clang/AST/DeclFriend.h:111
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation L
- clang::FriendDecl::FriendUnion Friend_
- clang::SourceLocation FriendL
- ArrayRef<clang::TemplateParameterList*> FriendTypeTPLists = None
¶static clang::FriendDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID,
unsigned int FriendTypeNumTPLists)
static clang::FriendDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID,
unsigned int FriendTypeNumTPLists)
Declared at: clang/include/clang/AST/DeclFriend.h:116
Parameters
- clang::ASTContext& C
- unsigned int ID
- unsigned int FriendTypeNumTPLists
¶FriendDecl(clang::DeclContext* DC,
clang::SourceLocation L,
clang::FriendDecl::FriendUnion Friend,
clang::SourceLocation FriendL,
ArrayRef<clang::TemplateParameterList*>
FriendTypeTPLists)
FriendDecl(clang::DeclContext* DC,
clang::SourceLocation L,
clang::FriendDecl::FriendUnion Friend,
clang::SourceLocation FriendL,
ArrayRef<clang::TemplateParameterList*>
FriendTypeTPLists)
Declared at: clang/include/clang/AST/DeclFriend.h:84
Parameters
- clang::DeclContext* DC
- clang::SourceLocation L
- clang::FriendDecl::FriendUnion Friend
- clang::SourceLocation FriendL
- ArrayRef<clang::TemplateParameterList*> FriendTypeTPLists
¶FriendDecl(clang::Decl::EmptyShell Empty,
unsigned int NumFriendTypeTPLists)
FriendDecl(clang::Decl::EmptyShell Empty,
unsigned int NumFriendTypeTPLists)
Declared at: clang/include/clang/AST/DeclFriend.h:93
Parameters
- clang::Decl::EmptyShell Empty
- unsigned int NumFriendTypeTPLists
¶virtual void anchor()
virtual void anchor()
Declared at: clang/include/clang/AST/DeclFriend.h:56
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclFriend.h:182
Parameters
- const clang::Decl* D
¶static bool classofKind(clang::Decl::Kind K)
static bool classofKind(clang::Decl::Kind K)
Declared at: clang/include/clang/AST/DeclFriend.h:183
Parameters
- clang::Decl::Kind K
¶clang::NamedDecl* getFriendDecl() const
clang::NamedDecl* getFriendDecl() const
Description
If this friend declaration doesn't name a type, return the inner declaration.
Declared at: clang/include/clang/AST/DeclFriend.h:138
¶clang::SourceLocation getFriendLoc() const
clang::SourceLocation getFriendLoc() const
Description
Retrieves the location of the 'friend' keyword.
Declared at: clang/include/clang/AST/DeclFriend.h:143
¶clang::TypeSourceInfo* getFriendType() const
clang::TypeSourceInfo* getFriendType() const
Description
If this friend declaration names an (untemplated but possibly dependent) type, return the type; otherwise return null. This is used for elaborated-type-specifiers and, in C++0x, for arbitrary friend type declarations.
Declared at: clang/include/clang/AST/DeclFriend.h:123
¶unsigned int
getFriendTypeNumTemplateParameterLists() const
unsigned int
getFriendTypeNumTemplateParameterLists() const
Declared at: clang/include/clang/AST/DeclFriend.h:127
¶clang::TemplateParameterList*
getFriendTypeTemplateParameterList(
unsigned int N) const
clang::TemplateParameterList*
getFriendTypeTemplateParameterList(
unsigned int N) const
Declared at: clang/include/clang/AST/DeclFriend.h:131
Parameters
- unsigned int N
¶clang::FriendDecl* getNextFriend()
clang::FriendDecl* getNextFriend()
Declared at: clang/include/clang/AST/DeclFriend.h:97
¶clang::FriendDecl* getNextFriendSlowCase()
clang::FriendDecl* getNextFriendSlowCase()
Declared at: clang/include/clang/AST/DeclFriend.h:103
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Retrieves the source range for the friend declaration.
Declared at: clang/include/clang/AST/DeclFriend.h:148
¶bool isUnsupportedFriend() const
bool isUnsupportedFriend() const
Description
Determines if this friend kind is unsupported.
Declared at: clang/include/clang/AST/DeclFriend.h:174
¶void setUnsupportedFriend(bool Unsupported)
void setUnsupportedFriend(bool Unsupported)
Declared at: clang/include/clang/AST/DeclFriend.h:177
Parameters
- bool Unsupported