clang  14.0.0git
Public Member Functions | Friends | List of all members
clang::DesignatedInitExpr::Designator Class Reference

Represents a single C99 designator. More...

#include "clang/AST/Expr.h"

Collaboration diagram for clang::DesignatedInitExpr::Designator:
Collaboration graph
[legend]

Public Member Functions

 Designator ()
 
 Designator (const IdentifierInfo *FieldName, SourceLocation DotLoc, SourceLocation FieldLoc)
 Initializes a field designator. More...
 
 Designator (unsigned Index, SourceLocation LBracketLoc, SourceLocation RBracketLoc)
 Initializes an array designator. More...
 
 Designator (unsigned Index, SourceLocation LBracketLoc, SourceLocation EllipsisLoc, SourceLocation RBracketLoc)
 Initializes a GNU array-range designator. More...
 
bool isFieldDesignator () const
 
bool isArrayDesignator () const
 
bool isArrayRangeDesignator () const
 
IdentifierInfogetFieldName () const
 
FieldDeclgetField () const
 
void setField (FieldDecl *FD)
 
SourceLocation getDotLoc () const
 
SourceLocation getFieldLoc () const
 
SourceLocation getLBracketLoc () const
 
SourceLocation getRBracketLoc () const
 
SourceLocation getEllipsisLoc () const
 
unsigned getFirstExprIndex () const
 
SourceLocation getBeginLoc () const LLVM_READONLY
 
SourceLocation getEndLoc () const LLVM_READONLY
 
SourceRange getSourceRange () const LLVM_READONLY
 

Friends

class DesignatedInitExpr
 

Detailed Description

Represents a single C99 designator.

Todo:
This class is infuriatingly similar to clang::Designator, but minor differences (storing indices vs. storing pointers) keep us from reusing it. Try harder, later, to rectify these differences.

Definition at line 5099 of file Expr.h.

Constructor & Destructor Documentation

◆ Designator() [1/4]

clang::DesignatedInitExpr::Designator::Designator ( )
inline

Definition at line 5116 of file Expr.h.

◆ Designator() [2/4]

clang::DesignatedInitExpr::Designator::Designator ( const IdentifierInfo FieldName,
SourceLocation  DotLoc,
SourceLocation  FieldLoc 
)
inline

◆ Designator() [3/4]

clang::DesignatedInitExpr::Designator::Designator ( unsigned  Index,
SourceLocation  LBracketLoc,
SourceLocation  RBracketLoc 
)
inline

Initializes an array designator.

Definition at line 5129 of file Expr.h.

◆ Designator() [4/4]

clang::DesignatedInitExpr::Designator::Designator ( unsigned  Index,
SourceLocation  LBracketLoc,
SourceLocation  EllipsisLoc,
SourceLocation  RBracketLoc 
)
inline

Initializes a GNU array-range designator.

Definition at line 5140 of file Expr.h.

Member Function Documentation

◆ getBeginLoc()

SourceLocation clang::DesignatedInitExpr::Designator::getBeginLoc ( ) const
inline

◆ getDotLoc()

SourceLocation clang::DesignatedInitExpr::Designator::getDotLoc ( ) const
inline

◆ getEllipsisLoc()

SourceLocation clang::DesignatedInitExpr::Designator::getEllipsisLoc ( ) const
inline

◆ getEndLoc()

SourceLocation clang::DesignatedInitExpr::Designator::getEndLoc ( ) const
inline

Definition at line 5209 of file Expr.h.

References getFieldLoc(), and getRBracketLoc().

Referenced by getSourceRange().

◆ getField()

FieldDecl* clang::DesignatedInitExpr::Designator::getField ( ) const
inline

Definition at line 5156 of file Expr.h.

References Field, and clang::DesignatedInitExpr::FieldDesignator::NameOrField.

Referenced by getFieldName().

◆ getFieldLoc()

SourceLocation clang::DesignatedInitExpr::Designator::getFieldLoc ( ) const
inline

◆ getFieldName()

IdentifierInfo * DesignatedInitExpr::Designator::getFieldName ( ) const

◆ getFirstExprIndex()

unsigned clang::DesignatedInitExpr::Designator::getFirstExprIndex ( ) const
inline

◆ getLBracketLoc()

SourceLocation clang::DesignatedInitExpr::Designator::getLBracketLoc ( ) const
inline

◆ getRBracketLoc()

SourceLocation clang::DesignatedInitExpr::Designator::getRBracketLoc ( ) const
inline

◆ getSourceRange()

SourceRange clang::DesignatedInitExpr::Designator::getSourceRange ( ) const
inline

Definition at line 5212 of file Expr.h.

References getBeginLoc(), and getEndLoc().

Referenced by clang::DesignatedInitExpr::getDesignatorsSourceRange().

◆ isArrayDesignator()

bool clang::DesignatedInitExpr::Designator::isArrayDesignator ( ) const
inline

Definition at line 5151 of file Expr.h.

Referenced by clang::ASTNodeImporter::import().

◆ isArrayRangeDesignator()

bool clang::DesignatedInitExpr::Designator::isArrayRangeDesignator ( ) const
inline

Definition at line 5152 of file Expr.h.

Referenced by clang::ASTNodeImporter::import().

◆ isFieldDesignator()

bool clang::DesignatedInitExpr::Designator::isFieldDesignator ( ) const
inline

Definition at line 5150 of file Expr.h.

Referenced by clang::ASTNodeImporter::import().

◆ setField()

void clang::DesignatedInitExpr::Designator::setField ( FieldDecl FD)
inline

Definition at line 5164 of file Expr.h.

References Field, and clang::DesignatedInitExpr::FieldDesignator::NameOrField.

Friends And Related Function Documentation

◆ DesignatedInitExpr

friend class DesignatedInitExpr
friend

Definition at line 5113 of file Expr.h.

Member Data Documentation

◆ ArrayOrRange

struct ArrayOrRangeDesignator clang::DesignatedInitExpr::Designator::ArrayOrRange

◆ Field

struct FieldDesignator clang::DesignatedInitExpr::Designator::Field

A field designator, e.g., ".x".

Definition at line 5109 of file Expr.h.

Referenced by Designator(), getDotLoc(), getField(), getFieldLoc(), getFieldName(), and setField().


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