clang 20.0.0git
|
Designator - A designator in a C99 designated initializer. More...
#include "clang/Sema/Designator.h"
Public Member Functions | |
bool | isFieldDesignator () const |
bool | isArrayDesignator () const |
bool | isArrayRangeDesignator () const |
const IdentifierInfo * | getFieldDecl () const |
SourceLocation | getDotLoc () const |
SourceLocation | getFieldLoc () const |
Expr * | getArrayIndex () const |
SourceLocation | getLBracketLoc () const |
SourceLocation | getRBracketLoc () const |
Expr * | getArrayRangeStart () const |
Expr * | getArrayRangeEnd () const |
SourceLocation | getEllipsisLoc () const |
void | setRBracketLoc (SourceLocation RBracketLoc) const |
Static Public Member Functions | |
static Designator | CreateFieldDesignator (const IdentifierInfo *FieldName, SourceLocation DotLoc, SourceLocation FieldLoc) |
Creates a field designator. | |
static Designator | CreateArrayDesignator (Expr *Index, SourceLocation LBracketLoc) |
Creates an array designator. | |
static Designator | CreateArrayRangeDesignator (Expr *Start, Expr *End, SourceLocation LBracketLoc, SourceLocation EllipsisLoc) |
Creates a GNU array-range designator. | |
Designator - A designator in a C99 designated initializer.
This class is a discriminated union which holds the various different sorts of designators possible. A Designation is an array of these. An example of a designator are things like this:
[8] .field [47] // C99 designation: 3 designators [8 ... 47] field: // GNU extensions: 2 designators
These occur in initializers, e.g.:
int a[10] = {2, 4, [8]=9, 10};
Definition at line 38 of file Designator.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Creates a field designator.
Definition at line 115 of file Designator.h.
References D.
Referenced by ExpandAnonymousFieldDesignator().
|
inline |
Definition at line 149 of file Designator.h.
References ArrayInfo, and isArrayDesignator().
|
inline |
Definition at line 186 of file Designator.h.
References ArrayRangeInfo, and isArrayRangeDesignator().
|
inline |
Definition at line 181 of file Designator.h.
References ArrayRangeInfo, and isArrayRangeDesignator().
|
inline |
Definition at line 128 of file Designator.h.
References FieldInfo, and isFieldDesignator().
|
inline |
Definition at line 191 of file Designator.h.
References ArrayRangeInfo, and isArrayRangeDesignator().
|
inline |
Definition at line 123 of file Designator.h.
References FieldInfo, and isFieldDesignator().
|
inline |
Definition at line 133 of file Designator.h.
References FieldInfo, and isFieldDesignator().
|
inline |
Definition at line 154 of file Designator.h.
References ArrayInfo, ArrayRangeInfo, isArrayDesignator(), and isArrayRangeDesignator().
|
inline |
Definition at line 161 of file Designator.h.
References ArrayInfo, ArrayRangeInfo, isArrayDesignator(), and isArrayRangeDesignator().
|
inline |
Definition at line 108 of file Designator.h.
Referenced by CheckArrayDesignatorSyntax(), getArrayIndex(), getLBracketLoc(), getRBracketLoc(), and setRBracketLoc().
|
inline |
Definition at line 109 of file Designator.h.
Referenced by CheckArrayDesignatorSyntax(), getArrayRangeEnd(), getArrayRangeStart(), getEllipsisLoc(), getLBracketLoc(), getRBracketLoc(), and setRBracketLoc().
|
inline |
Definition at line 107 of file Designator.h.
Referenced by getDotLoc(), getFieldDecl(), and getFieldLoc().
|
inline |
Definition at line 196 of file Designator.h.
References ArrayInfo, ArrayRangeInfo, isArrayDesignator(), and isArrayRangeDesignator().
ArrayDesignatorInfo clang::Designator::ArrayInfo |
Definition at line 100 of file Designator.h.
Referenced by getArrayIndex(), getLBracketLoc(), getRBracketLoc(), and setRBracketLoc().
ArrayRangeDesignatorInfo clang::Designator::ArrayRangeInfo |
Definition at line 101 of file Designator.h.
Referenced by getArrayRangeEnd(), getArrayRangeStart(), getEllipsisLoc(), getLBracketLoc(), getRBracketLoc(), and setRBracketLoc().
FieldDesignatorInfo clang::Designator::FieldInfo |
Definition at line 99 of file Designator.h.
Referenced by getDotLoc(), getFieldDecl(), and getFieldLoc().