clang  6.0.0svn
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 getLocStart () const LLVM_READONLY
 
SourceLocation getLocEnd () 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 4182 of file Expr.h.

Constructor & Destructor Documentation

◆ Designator() [1/4]

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

Definition at line 4199 of file Expr.h.

◆ Designator() [2/4]

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

Initializes a field designator.

Definition at line 4202 of file Expr.h.

References clang::SubobjectAdjustment::Field, and clang::SourceLocation::getRawEncoding().

◆ Designator() [3/4]

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

◆ Designator() [4/4]

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

Member Function Documentation

◆ getDotLoc()

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

◆ getEllipsisLoc()

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

◆ getField()

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

Definition at line 4236 of file Expr.h.

References clang::SubobjectAdjustment::Field.

◆ 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

◆ getLocEnd()

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

Definition at line 4289 of file Expr.h.

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

◆ getLocStart()

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

◆ getRBracketLoc()

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

◆ getSourceRange()

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

Definition at line 4292 of file Expr.h.

References clang::Create(), and clang::CreateEmpty().

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

◆ isArrayDesignator()

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

Definition at line 4231 of file Expr.h.

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

◆ isArrayRangeDesignator()

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

Definition at line 4232 of file Expr.h.

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

◆ isFieldDesignator()

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

◆ setField()

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

Definition at line 4244 of file Expr.h.

References clang::SubobjectAdjustment::Field.

Friends And Related Function Documentation

◆ DesignatedInitExpr

friend class DesignatedInitExpr
friend

Definition at line 4196 of file Expr.h.

Member Data Documentation

◆ ArrayOrRange

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

An array or GNU array-range designator, e.g., "[9]" or "[10..15]".

Definition at line 4194 of file Expr.h.

Referenced by clang::DesignatedInitExpr::getArrayIndex(), clang::DesignatedInitExpr::getArrayRangeEnd(), clang::DesignatedInitExpr::getArrayRangeStart(), and clang::DesignatedInitExpr::getLocStart().

◆ Field

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

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

Definition at line 4192 of file Expr.h.

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


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