23void FriendDecl::anchor() {}
29 if (
const auto *D = dyn_cast<NamedDecl *>(
Friend)) {
37 assert(D->getFriendObjectKind() ||
53 return cast_or_null<FriendDecl>(
57FriendDecl *CXXRecordDecl::getFirstFriend()
const {
74 if (
const auto *FD = dyn_cast<FunctionDecl>(ND))
75 return FD->getSourceRange();
76 if (
const auto *FTD = dyn_cast<FunctionTemplateDecl>(ND))
77 return FTD->getSourceRange();
78 if (
const auto *CTD = dyn_cast<ClassTemplateDecl>(ND))
79 return CTD->getSourceRange();
80 if (
const auto *DD = dyn_cast<DeclaratorDecl>(ND)) {
81 if (DD->getOuterLocStart() != DD->getInnerLocStart())
82 return DD->getSourceRange();
Defines the clang::ASTContext interface.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any.
ASTContext & getParentASTContext() const
Decl - This represents one declaration (or definition), e.g.
ASTContext & getASTContext() const LLVM_READONLY
SourceLocation getLocation() const
Abstract interface for external sources of AST nodes.
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
FriendDecl(Kind K, DeclContext *DC, SourceLocation L, FriendUnion Friend, SourceLocation FL, SourceLocation EllipsisLoc={})
llvm::PointerUnion< NamedDecl *, TypeSourceInfo * > FriendUnion
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
SourceLocation getFriendLoc() const
SourceLocation getEllipsisLoc() const
Retrieves the location of the '...', if present.
FriendDecl * getNextFriendSlowCase()
virtual NamedDecl * getFriendDecl() const
If this friend declaration doesn't name a type, return the inner declaration.
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
bool isPackExpansion() const
static FriendDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend, SourceLocation FriendL, SourceLocation EllipsisLoc={})
static FriendDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
This represents a decl that may have a name.
Encodes a location in the source.
A trivial tuple used to represent a source range.
A container of type source information.
Top level wrappers for InstallAPI frontend operations.
bool isa(CodeGen::Address addr)
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
U cast(CodeGen::Address addr)
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
T * get(ExternalASTSource *Source) const
Retrieve the pointer to the AST node that this lazy pointer points to.