clang 22.0.0git
|
Helper class for OffsetOfExpr. More...
#include "clang/AST/Expr.h"
Public Types | |
enum | Kind { Array = 0x00 , Field = 0x01 , Identifier = 0x02 , Base = 0x03 } |
The kind of offsetof node we have. More... |
Public Member Functions | |
OffsetOfNode (SourceLocation LBracketLoc, unsigned Index, SourceLocation RBracketLoc) | |
Create an offsetof node that refers to an array element. | |
OffsetOfNode (SourceLocation DotLoc, FieldDecl *Field, SourceLocation NameLoc) | |
Create an offsetof node that refers to a field. | |
OffsetOfNode (SourceLocation DotLoc, IdentifierInfo *Name, SourceLocation NameLoc) | |
Create an offsetof node that refers to an identifier. | |
OffsetOfNode (const CXXBaseSpecifier *Base) | |
Create an offsetof node that refers into a C++ base class. | |
Kind | getKind () const |
Determine what kind of offsetof node this is. | |
unsigned | getArrayExprIndex () const |
For an array element node, returns the index into the array of expressions. | |
FieldDecl * | getField () const |
For a field offsetof node, returns the field. | |
IdentifierInfo * | getFieldName () const |
For a field or identifier offsetof node, returns the name of the field. | |
CXXBaseSpecifier * | getBase () const |
For a base class node, returns the base specifier. | |
SourceRange | getSourceRange () const LLVM_READONLY |
Retrieve the source range that covers this offsetof node. | |
SourceLocation | getBeginLoc () const LLVM_READONLY |
SourceLocation | getEndLoc () const LLVM_READONLY |
Helper class for OffsetOfExpr.
|
inline |
Create an offsetof node that refers to an array element.
Definition at line 2455 of file Expr.h.
References Array.
Referenced by OffsetOfNode(), and OffsetOfNode().
|
inline |
Create an offsetof node that refers to a field.
Definition at line 2460 of file Expr.h.
References Field, and OffsetOfNode().
|
inline |
Create an offsetof node that refers to an identifier.
Definition at line 2465 of file Expr.h.
References Identifier.
|
inlineexplicit |
Create an offsetof node that refers into a C++ base class.
Definition at line 2471 of file Expr.h.
References Base, and OffsetOfNode().
|
inline |
For an array element node, returns the index into the array of expressions.
Definition at line 2479 of file Expr.h.
References Array, and getKind().
Referenced by clang::ASTNodeImporter::VisitOffsetOfExpr(), and clang::interp::Compiler< Emitter >::VisitOffsetOfExpr().
|
inline |
For a base class node, returns the base specifier.
Definition at line 2495 of file Expr.h.
References Base, and getKind().
Referenced by clang::interp::InterpretOffsetOf(), and clang::ASTNodeImporter::VisitOffsetOfExpr().
|
inline |
Definition at line 2507 of file Expr.h.
Referenced by clang::ASTNodeImporter::VisitOffsetOfExpr().
|
inline |
Definition at line 2508 of file Expr.h.
Referenced by clang::ASTNodeImporter::VisitOffsetOfExpr(), and clang::tooling::RecursiveSymbolVisitor< T >::VisitOffsetOfExpr().
|
inline |
For a field offsetof node, returns the field.
Definition at line 2485 of file Expr.h.
References Field, and getKind().
Referenced by getFieldName(), clang::interp::InterpretOffsetOf(), clang::ASTNodeImporter::VisitOffsetOfExpr(), and clang::tooling::RecursiveSymbolVisitor< T >::VisitOffsetOfExpr().
IdentifierInfo * OffsetOfNode::getFieldName | ( | ) | const |
For a field or identifier offsetof node, returns the name of the field.
Definition at line 1684 of file Expr.cpp.
References Field, getField(), clang::NamedDecl::getIdentifier(), getKind(), and Identifier.
Referenced by clang::ASTNodeImporter::VisitOffsetOfExpr().
|
inline |
Determine what kind of offsetof node this is.
Definition at line 2475 of file Expr.h.
Referenced by getArrayExprIndex(), getBase(), getField(), getFieldName(), clang::interp::InterpretOffsetOf(), clang::ASTNodeImporter::VisitOffsetOfExpr(), clang::interp::Compiler< Emitter >::VisitOffsetOfExpr(), and clang::tooling::RecursiveSymbolVisitor< T >::VisitOffsetOfExpr().
|
inline |
Retrieve the source range that covers this offsetof node.
For an array element node, the source range contains the locations of the square brackets. For a field or identifier node, the source range contains the location of the period (if there is one) and the identifier.