clang: clang::OffsetOfNode Class Reference (original) (raw)

Helper class for OffsetOfExpr. More...

#include "[clang/AST/Expr.h](Expr%5F8h%5Fsource.html)"

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.

Definition at line 2413 of file Expr.h.

Kind

The kind of offsetof node we have.

Enumerator
Array An index into an array.
Field A field.
Identifier A field in a dependent type, known only by its name.
Base An implicit indirection through a C++ base class, when the field found is in a base class.

Definition at line 2416 of file Expr.h.

Create an offsetof node that refers to an array element.

Definition at line 2447 of file Expr.h.

References Data, and Range.

OffsetOfNode() [2/4]

Create an offsetof node that refers to a field.

Definition at line 2452 of file Expr.h.

References Data, and Range.

OffsetOfNode() [3/4]

Create an offsetof node that refers to an identifier.

Definition at line 2457 of file Expr.h.

References Data, and Range.

OffsetOfNode() [4/4]

clang::OffsetOfNode::OffsetOfNode ( const CXXBaseSpecifier * Base) inlineexplicit

Create an offsetof node that refers into a C++ base class.

Definition at line 2463 of file Expr.h.

References Data.

getArrayExprIndex()

unsigned clang::OffsetOfNode::getArrayExprIndex ( ) const inline

getBase()

getBeginLoc()

getEndLoc()

getField()

FieldDecl * clang::OffsetOfNode::getField ( ) const inline

getFieldName()

getKind()

Kind clang::OffsetOfNode::getKind ( ) const inline

getSourceRange()

SourceRange clang::OffsetOfNode::getSourceRange ( ) const 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.

Definition at line 2498 of file Expr.h.

References Range.


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