class OffsetOfNode

Declaration

class OffsetOfNode { /* full declaration omitted */ };

Description

Helper class for OffsetOfExpr.

Declared at: clang/include/clang/AST/Expr.h:2340

Member Variables

private clang::SourceRange Range
The source range that covers this part of the designator.
private uintptr_t Data
The data describing the designator, which comes in three different forms, depending on the lower two bits. - An unsigned index into the array of Expr*'s stored after this node in memory, for [constant-expression] designators. - A FieldDecl*, for references to a known field. - An IdentifierInfo*, for references to a field with a given name when the class type is dependent. - A CXXBaseSpecifier*, for references that look at a field in a base class.

Method Overview

  • public OffsetOfNode(clang::SourceLocation LBracketLoc, unsigned int Index, clang::SourceLocation RBracketLoc)
  • public OffsetOfNode(clang::SourceLocation DotLoc, clang::FieldDecl * Field, clang::SourceLocation NameLoc)
  • public OffsetOfNode(clang::SourceLocation DotLoc, clang::IdentifierInfo * Name, clang::SourceLocation NameLoc)
  • public OffsetOfNode(const clang::CXXBaseSpecifier * Base)
  • public unsigned int getArrayExprIndex() const
  • public clang::CXXBaseSpecifier * getBase() const
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::FieldDecl * getField() const
  • public clang::IdentifierInfo * getFieldName() const
  • public clang::OffsetOfNode::Kind getKind() const
  • public clang::SourceRange getSourceRange() const

Methods

OffsetOfNode(clang::SourceLocation LBracketLoc,
             unsigned int Index,
             clang::SourceLocation RBracketLoc)

Description

Create an offsetof node that refers to an array element.

Declared at: clang/include/clang/AST/Expr.h:2374

Parameters

clang::SourceLocation LBracketLoc
unsigned int Index
clang::SourceLocation RBracketLoc

OffsetOfNode(clang::SourceLocation DotLoc,
             clang::FieldDecl* Field,
             clang::SourceLocation NameLoc)

Description

Create an offsetof node that refers to a field.

Declared at: clang/include/clang/AST/Expr.h:2379

Parameters

clang::SourceLocation DotLoc
clang::FieldDecl* Field
clang::SourceLocation NameLoc

OffsetOfNode(clang::SourceLocation DotLoc,
             clang::IdentifierInfo* Name,
             clang::SourceLocation NameLoc)

Description

Create an offsetof node that refers to an identifier.

Declared at: clang/include/clang/AST/Expr.h:2384

Parameters

clang::SourceLocation DotLoc
clang::IdentifierInfo* Name
clang::SourceLocation NameLoc

OffsetOfNode(const clang::CXXBaseSpecifier* Base)

Description

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

Declared at: clang/include/clang/AST/Expr.h:2390

Parameters

const clang::CXXBaseSpecifier* Base

unsigned int getArrayExprIndex() const

Description

For an array element node, returns the index into the array of expressions.

Declared at: clang/include/clang/AST/Expr.h:2398

clang::CXXBaseSpecifier* getBase() const

Description

For a base class node, returns the base specifier.

Declared at: clang/include/clang/AST/Expr.h:2414

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:2426

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:2427

clang::FieldDecl* getField() const

Description

For a field offsetof node, returns the field.

Declared at: clang/include/clang/AST/Expr.h:2404

clang::IdentifierInfo* getFieldName() const

Description

For a field or identifier offsetof node, returns the name of the field.

Declared at: clang/include/clang/AST/Expr.h:2411

clang::OffsetOfNode::Kind getKind() const

Description

Determine what kind of offsetof node this is.

Declared at: clang/include/clang/AST/Expr.h:2394

clang::SourceRange getSourceRange() const

Description

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.

Declared at: clang/include/clang/AST/Expr.h:2425