clang API Documentation

Public Member Functions | Static Public Member Functions
clang::LabelDecl Class Reference

#include <Decl.h>

Inheritance diagram for clang::LabelDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::LabelDecl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

LabelStmtgetStmt () const
void setStmt (LabelStmt *T)
bool isGnuLocal () const
void setLocStart (SourceLocation L)
SourceRange getSourceRange () const override LLVM_READONLY
 Source range that this declaration covers.
bool isMSAsmLabel () const
bool isResolvedMSAsmLabel () const
void setMSAsmLabel (StringRef Name)
StringRef getMSAsmLabel () const
void setMSAsmLabelResolved ()

Static Public Member Functions

static LabelDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation IdentL, IdentifierInfo *II)
static LabelDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation IdentL, IdentifierInfo *II, SourceLocation GnuLabelL)
static LabelDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Detailed Description

LabelDecl - Represents the declaration of a label. Labels also have a corresponding LabelStmt, which indicates the position that the label was defined at. For normal labels, the location of the decl is the same as the location of the statement. For GNU local labels (__label__), the decl location is where the __label__ is.

Definition at line 311 of file Decl.h.


Member Function Documentation

static bool clang::LabelDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::NamedDecl.

Definition at line 353 of file Decl.h.

References classofKind(), and clang::Decl::getKind().

static bool clang::LabelDecl::classofKind ( Kind  K) [inline, static]

Reimplemented from clang::NamedDecl.

Definition at line 354 of file Decl.h.

Referenced by classof().

LabelDecl * LabelDecl::Create ( ASTContext C,
DeclContext DC,
SourceLocation  IdentL,
IdentifierInfo II 
) [static]

Definition at line 3732 of file Decl.cpp.

References AttributeLangSupport::C.

Referenced by clang::Sema::LookupOrCreateLabel().

LabelDecl * LabelDecl::Create ( ASTContext C,
DeclContext DC,
SourceLocation  IdentL,
IdentifierInfo II,
SourceLocation  GnuLabelL 
) [static]

Definition at line 3737 of file Decl.cpp.

References AttributeLangSupport::C.

Definition at line 3744 of file Decl.cpp.

References AttributeLangSupport::C.

StringRef clang::LabelDecl::getMSAsmLabel ( ) const [inline]

Definition at line 349 of file Decl.h.

SourceRange clang::LabelDecl::getSourceRange ( ) const [inline, override, virtual]

Source range that this declaration covers.

Reimplemented from clang::Decl.

Definition at line 342 of file Decl.h.

References clang::Decl::getLocation().

LabelStmt* clang::LabelDecl::getStmt ( ) const [inline]
bool clang::LabelDecl::isGnuLocal ( ) const [inline]

Definition at line 339 of file Decl.h.

References clang::Decl::getLocation().

Referenced by clang::Sema::ActOnLabelStmt().

Definition at line 347 of file Decl.h.

References isMSAsmLabel().

Referenced by CheckPoppedLabel().

Definition at line 340 of file Decl.h.

Referenced by clang::Sema::ActOnLabelStmt(), and clang::ASTDeclReader::VisitLabelDecl().

void LabelDecl::setMSAsmLabel ( StringRef  Name)

Definition at line 3749 of file Decl.cpp.

References clang::Decl::getASTContext().

Referenced by clang::Sema::GetOrCreateMSAsmLabel().

Definition at line 350 of file Decl.h.

Referenced by clang::Sema::GetOrCreateMSAsmLabel().

void clang::LabelDecl::setStmt ( LabelStmt T) [inline]

Definition at line 337 of file Decl.h.

Referenced by clang::Sema::ActOnLabelStmt().


The documentation for this class was generated from the following files: