clang API Documentation
#include <Expr.h>


Classes | |
| class | OffsetOfNode |
Public Member Functions | |
| SourceLocation | getOperatorLoc () const |
| getOperatorLoc - Return the location of the operator. | |
| void | setOperatorLoc (SourceLocation L) |
| SourceLocation | getRParenLoc () const |
| Return the location of the right parentheses. | |
| void | setRParenLoc (SourceLocation R) |
| TypeSourceInfo * | getTypeSourceInfo () const |
| void | setTypeSourceInfo (TypeSourceInfo *tsi) |
| const OffsetOfNode & | getComponent (unsigned Idx) const |
| void | setComponent (unsigned Idx, OffsetOfNode ON) |
| unsigned | getNumComponents () const |
| Expr * | getIndexExpr (unsigned Idx) |
| const Expr * | getIndexExpr (unsigned Idx) const |
| void | setIndexExpr (unsigned Idx, Expr *E) |
| unsigned | getNumExpressions () const |
| SourceRange | getSourceRange () const LLVM_READONLY |
| child_range | children () |
Static Public Member Functions | |
| static OffsetOfExpr * | Create (ASTContext &C, QualType type, SourceLocation OperatorLoc, TypeSourceInfo *tsi, OffsetOfNode *compsPtr, unsigned numComps, Expr **exprsPtr, unsigned numExprs, SourceLocation RParenLoc) |
| static OffsetOfExpr * | CreateEmpty (ASTContext &C, unsigned NumComps, unsigned NumExprs) |
| static bool | classof (const Stmt *T) |
| static bool | classof (const OffsetOfExpr *) |
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator). For example, given:
we can represent and evaluate the expression offsetof(struct T, s[2].d).
| child_range clang::OffsetOfExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
| static bool clang::OffsetOfExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 1817 of file Expr.h.
References clang::Stmt::getStmtClass().
| static bool clang::OffsetOfExpr::classof | ( | const OffsetOfExpr * | ) | [inline, static] |
| OffsetOfExpr * OffsetOfExpr::Create | ( | ASTContext & | C, |
| QualType | type, | ||
| SourceLocation | OperatorLoc, | ||
| TypeSourceInfo * | tsi, | ||
| OffsetOfNode * | compsPtr, | ||
| unsigned | numComps, | ||
| Expr ** | exprsPtr, | ||
| unsigned | numExprs, | ||
| SourceLocation | RParenLoc | ||
| ) | [static] |
Definition at line 991 of file Expr.cpp.
References clang::ASTContext::Allocate().
Referenced by clang::Sema::BuildBuiltinOffsetOf().
| OffsetOfExpr * OffsetOfExpr::CreateEmpty | ( | ASTContext & | C, |
| unsigned | NumComps, | ||
| unsigned | NumExprs | ||
| ) | [static] |
Definition at line 1005 of file Expr.cpp.
References clang::ASTContext::Allocate().
| const OffsetOfNode& clang::OffsetOfExpr::getComponent | ( | unsigned | Idx | ) | const [inline] |
| Expr* clang::OffsetOfExpr::getIndexExpr | ( | unsigned | Idx | ) | [inline] |
Definition at line 1794 of file Expr.h.
Referenced by getIndexExpr().
| const Expr* clang::OffsetOfExpr::getIndexExpr | ( | unsigned | Idx | ) | const [inline] |
Definition at line 1799 of file Expr.h.
References getIndexExpr().
| unsigned clang::OffsetOfExpr::getNumComponents | ( | ) | const [inline] |
| unsigned clang::OffsetOfExpr::getNumExpressions | ( | ) | const [inline] |
| SourceLocation clang::OffsetOfExpr::getOperatorLoc | ( | ) | const [inline] |
| SourceLocation clang::OffsetOfExpr::getRParenLoc | ( | ) | const [inline] |
| SourceRange clang::OffsetOfExpr::getSourceRange | ( | ) | const [inline] |
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.
Reimplemented from clang::Stmt.
| TypeSourceInfo* clang::OffsetOfExpr::getTypeSourceInfo | ( | ) | const [inline] |
| void clang::OffsetOfExpr::setComponent | ( | unsigned | Idx, |
| OffsetOfNode | ON | ||
| ) | [inline] |
| void clang::OffsetOfExpr::setIndexExpr | ( | unsigned | Idx, |
| Expr * | E | ||
| ) | [inline] |
| void clang::OffsetOfExpr::setOperatorLoc | ( | SourceLocation | L | ) | [inline] |
| void clang::OffsetOfExpr::setRParenLoc | ( | SourceLocation | R | ) | [inline] |
| void clang::OffsetOfExpr::setTypeSourceInfo | ( | TypeSourceInfo * | tsi | ) | [inline] |