class CaseStmt
Declaration
class CaseStmt : public SwitchCase, private TrailingObjects { /* full declaration omitted */ };
Description
CaseStmt - Represent a case statement. It can optionally be a GNU case statement of the form LHS ... RHS representing a range of cases.
Declared at: clang/include/clang/AST/Stmt.h:1599
Inherits from: SwitchCase, TrailingObjects
Member Variables
Inherited from SwitchCase:
Inherited from Stmt:
Method Overview
- private CaseStmt(clang::Expr * lhs, clang::Expr * rhs, clang::SourceLocation caseLoc, clang::SourceLocation ellipsisLoc, clang::SourceLocation colonLoc)
- private CaseStmt(clang::Stmt::EmptyShell Empty, bool CaseStmtIsGNURange)
- public static clang::CaseStmt * Create(const clang::ASTContext & Ctx, clang::Expr * lhs, clang::Expr * rhs, clang::SourceLocation caseLoc, clang::SourceLocation ellipsisLoc, clang::SourceLocation colonLoc)
- public static clang::CaseStmt * CreateEmpty(const clang::ASTContext & Ctx, bool CaseStmtIsGNURange)
- public bool caseStmtIsGNURange() const
- public clang::Stmt::const_child_range children() const
- public clang::Stmt::child_range children()
- public static bool classof(const clang::Stmt * T)
- public clang::SourceLocation getBeginLoc() const
- public clang::SourceLocation getCaseLoc() const
- public clang::SourceLocation getEllipsisLoc() const
- public clang::SourceLocation getEndLoc() const
- public clang::Expr * getLHS()
- public const clang::Expr * getLHS() const
- public clang::Expr * getRHS()
- public const clang::Expr * getRHS() const
- public clang::Stmt * getSubStmt()
- public const clang::Stmt * getSubStmt() const
- private unsigned int lhsOffset() const
- private unsigned int numTrailingObjects(OverloadToken<clang::Stmt *>) const
- private unsigned int numTrailingObjects(OverloadToken<clang::SourceLocation>) const
- private unsigned int rhsOffset() const
- public void setCaseLoc(clang::SourceLocation L)
- public void setEllipsisLoc(clang::SourceLocation L)
- public void setLHS(clang::Expr * Val)
- public void setRHS(clang::Expr * Val)
- public void setSubStmt(clang::Stmt * S)
- private unsigned int subStmtOffset() const
Inherited from SwitchCase:
- public classof
- public getBeginLoc
- public getColonLoc
- public getEndLoc
- public getKeywordLoc
- public getNextSwitchCase
- public getNextSwitchCase
- public getSubStmt
- public getSubStmt
- public setColonLoc
- public setKeywordLoc
- public setNextSwitchCase
Inherited from Stmt:
- public EnableStatistics
- public IgnoreContainers
- public IgnoreContainers
- public PrintStats
- public ProcessODRHash
- public Profile
- public addStmtClass
- public child_begin
- public child_begin
- public child_end
- public child_end
- public children
- public children
- public determineLikelihoodConflict
- public dump
- public dump
- public dumpColor
- public dumpPretty
- public getBeginLoc
- public getEndLoc
- public getID
- public getLikelihood
- public getLikelihood
- public getLikelihood
- public getLikelihoodAttr
- public getSourceRange
- public getStmtClass
- public getStmtClassName
- public printJson
- public printPretty
- public printPrettyControlled
- public stripLabelLikeStatements
- public stripLabelLikeStatements
- public viewAST
Methods
¶CaseStmt(clang::Expr* lhs,
clang::Expr* rhs,
clang::SourceLocation caseLoc,
clang::SourceLocation ellipsisLoc,
clang::SourceLocation colonLoc)
CaseStmt(clang::Expr* lhs,
clang::Expr* rhs,
clang::SourceLocation caseLoc,
clang::SourceLocation ellipsisLoc,
clang::SourceLocation colonLoc)
Description
Build a case statement assuming that the storage for the trailing objects has been properly allocated.
Declared at: clang/include/clang/AST/Stmt.h:1636
Parameters
- clang::Expr* lhs
- clang::Expr* rhs
- clang::SourceLocation caseLoc
- clang::SourceLocation ellipsisLoc
- clang::SourceLocation colonLoc
¶CaseStmt(clang::Stmt::EmptyShell Empty,
bool CaseStmtIsGNURange)
CaseStmt(clang::Stmt::EmptyShell Empty,
bool CaseStmtIsGNURange)
Description
Build an empty switch case statement.
Declared at: clang/include/clang/AST/Stmt.h:1651
Parameters
- clang::Stmt::EmptyShell Empty
- bool CaseStmtIsGNURange
¶static clang::CaseStmt* Create(
const clang::ASTContext& Ctx,
clang::Expr* lhs,
clang::Expr* rhs,
clang::SourceLocation caseLoc,
clang::SourceLocation ellipsisLoc,
clang::SourceLocation colonLoc)
static clang::CaseStmt* Create(
const clang::ASTContext& Ctx,
clang::Expr* lhs,
clang::Expr* rhs,
clang::SourceLocation caseLoc,
clang::SourceLocation ellipsisLoc,
clang::SourceLocation colonLoc)
Description
Build a case statement.
Declared at: clang/include/clang/AST/Stmt.h:1658
Parameters
- const clang::ASTContext& Ctx
- clang::Expr* lhs
- clang::Expr* rhs
- clang::SourceLocation caseLoc
- clang::SourceLocation ellipsisLoc
- clang::SourceLocation colonLoc
¶static clang::CaseStmt* CreateEmpty(
const clang::ASTContext& Ctx,
bool CaseStmtIsGNURange)
static clang::CaseStmt* CreateEmpty(
const clang::ASTContext& Ctx,
bool CaseStmtIsGNURange)
Description
Build an empty case statement.
Declared at: clang/include/clang/AST/Stmt.h:1663
Parameters
- const clang::ASTContext& Ctx
- bool CaseStmtIsGNURange
¶bool caseStmtIsGNURange() const
bool caseStmtIsGNURange() const
Description
True if this case statement is of the form case LHS ... RHS, which is a GNU extension. In this case the RHS can be obtained with getRHS() and the location of the ellipsis can be obtained with getEllipsisLoc().
Declared at: clang/include/clang/AST/Stmt.h:1668
¶clang::Stmt::const_child_range children() const
clang::Stmt::const_child_range children() const
Declared at: clang/include/clang/AST/Stmt.h:1748
¶clang::Stmt::child_range children()
clang::Stmt::child_range children()
Declared at: clang/include/clang/AST/Stmt.h:1742
¶static bool classof(const clang::Stmt* T)
static bool classof(const clang::Stmt* T)
Declared at: clang/include/clang/AST/Stmt.h:1737
Parameters
- const clang::Stmt* T
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/Stmt.h:1727
¶clang::SourceLocation getCaseLoc() const
clang::SourceLocation getCaseLoc() const
Declared at: clang/include/clang/AST/Stmt.h:1670
¶clang::SourceLocation getEllipsisLoc() const
clang::SourceLocation getEllipsisLoc() const
Description
Get the location of the ... in a case statement of the form LHS ... RHS.
Declared at: clang/include/clang/AST/Stmt.h:1674
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/Stmt.h:1728
¶clang::Expr* getLHS()
clang::Expr* getLHS()
Declared at: clang/include/clang/AST/Stmt.h:1688
¶const clang::Expr* getLHS() const
const clang::Expr* getLHS() const
Declared at: clang/include/clang/AST/Stmt.h:1692
¶clang::Expr* getRHS()
clang::Expr* getRHS()
Declared at: clang/include/clang/AST/Stmt.h:1700
¶const clang::Expr* getRHS() const
const clang::Expr* getRHS() const
Declared at: clang/include/clang/AST/Stmt.h:1706
¶clang::Stmt* getSubStmt()
clang::Stmt* getSubStmt()
Declared at: clang/include/clang/AST/Stmt.h:1718
¶const clang::Stmt* getSubStmt() const
const clang::Stmt* getSubStmt() const
Declared at: clang/include/clang/AST/Stmt.h:1719
¶unsigned int lhsOffset() const
unsigned int lhsOffset() const
Declared at: clang/include/clang/AST/Stmt.h:1630
¶unsigned int numTrailingObjects(
OverloadToken<clang::Stmt*>) const
unsigned int numTrailingObjects(
OverloadToken<clang::Stmt*>) const
Declared at: clang/include/clang/AST/Stmt.h:1622
Parameters
- OverloadToken<clang::Stmt*>
¶unsigned int numTrailingObjects(
OverloadToken<clang::SourceLocation>) const
unsigned int numTrailingObjects(
OverloadToken<clang::SourceLocation>) const
Declared at: clang/include/clang/AST/Stmt.h:1626
Parameters
- OverloadToken<clang::SourceLocation>
¶unsigned int rhsOffset() const
unsigned int rhsOffset() const
Declared at: clang/include/clang/AST/Stmt.h:1631
¶void setCaseLoc(clang::SourceLocation L)
void setCaseLoc(clang::SourceLocation L)
Declared at: clang/include/clang/AST/Stmt.h:1671
Parameters
¶void setEllipsisLoc(clang::SourceLocation L)
void setEllipsisLoc(clang::SourceLocation L)
Description
Set the location of the ... in a case statement of the form LHS ... RHS. Assert that this case statement is of this form.
Declared at: clang/include/clang/AST/Stmt.h:1681
Parameters
¶void setLHS(clang::Expr* Val)
void setLHS(clang::Expr* Val)
Declared at: clang/include/clang/AST/Stmt.h:1696
Parameters
- clang::Expr* Val
¶void setRHS(clang::Expr* Val)
void setRHS(clang::Expr* Val)
Declared at: clang/include/clang/AST/Stmt.h:1712
Parameters
- clang::Expr* Val
¶void setSubStmt(clang::Stmt* S)
void setSubStmt(clang::Stmt* S)
Declared at: clang/include/clang/AST/Stmt.h:1723
Parameters
- clang::Stmt* S
¶unsigned int subStmtOffset() const
unsigned int subStmtOffset() const
Declared at: clang/include/clang/AST/Stmt.h:1632