clang-tools 22.0.0git
|
Represents a part of a designation in a C99/C++20 designated initializer. More...
#include <Designator.h>
Public Types | |
enum | Kind { STRUCT , ARRAY , ARRAY_RANGE } |
Public Member Functions | |
Designator (const QualType Type, RecordDecl::field_iterator Field, const RecordDecl *RD) | |
Designator (const QualType Type, uint64_t Idx, uint64_t Size) | |
Designator (const QualType Type, uint64_t Start, uint64_t End, uint64_t Size) | |
void | advanceToNextField () |
Moves the iterator to the next element. | |
bool | isFinished () |
Checks if the iterator has iterated through all elements. | |
Kind | getTag () const |
QualType | getType () const |
const RecordDecl::field_iterator | getStructIter () const |
const RecordDecl * | getStructDecl () const |
uint64_t | getArrayIndex () const |
uint64_t | getArrayRangeStart () const |
uint64_t | getArrayRangeEnd () const |
uint64_t | getArraySize () const |
Represents a part of a designation in a C99/C++20 designated initializer.
It is a tagged union of different kinds of designators: struct, array and array range. Holds enough information to be able to advance to the next field and to know when all fields have been iterated through.
Definition at line 29 of file Designator.h.
Enumerator | |
---|---|
STRUCT | |
ARRAY | |
ARRAY_RANGE |
Definition at line 31 of file Designator.h.
|
inline |
Definition at line 33 of file Designator.h.
|
inline |
Definition at line 37 of file Designator.h.
References Type.
|
inline |
Definition at line 40 of file Designator.h.
References Type.
void clang::reorder_fields::Designator::advanceToNextField | ( | ) |
Moves the iterator to the next element.
Definition at line 23 of file Designator.cpp.
References ARRAY, ARRAY_RANGE, ArrayIt, ArrayRangeIt, isFinished(), STRUCT, and StructIt.
|
inline |
Definition at line 62 of file Designator.h.
References ARRAY, and ArrayIt.
Referenced by clang::reorder_fields::ReorderedStruct::operator()().
|
inline |
Definition at line 72 of file Designator.h.
References ARRAY_RANGE, and ArrayRangeIt.
|
inline |
Definition at line 67 of file Designator.h.
References ARRAY_RANGE, and ArrayRangeIt.
Referenced by clang::reorder_fields::ReorderedStruct::operator()().
|
inline |
Definition at line 77 of file Designator.h.
References ARRAY, ARRAY_RANGE, ArrayIt, and ArrayRangeIt.
|
inline |
Definition at line 57 of file Designator.h.
References STRUCT, and StructIt.
Referenced by clang::reorder_fields::ReorderedStruct::operator()().
|
inline |
Definition at line 52 of file Designator.h.
References STRUCT, and StructIt.
Referenced by clang::reorder_fields::ReorderedStruct::operator()().
|
inline |
Definition at line 49 of file Designator.h.
Referenced by clang::reorder_fields::ReorderedStruct::operator()().
|
inline |
Definition at line 50 of file Designator.h.
bool clang::reorder_fields::Designator::isFinished | ( | ) |
Checks if the iterator has iterated through all elements.
Definition at line 51 of file Designator.cpp.
References ARRAY, ARRAY_RANGE, ArrayIt, ArrayRangeIt, STRUCT, and StructIt.
Referenced by advanceToNextField().
ArrayIter clang::reorder_fields::Designator::ArrayIt |
Definition at line 114 of file Designator.h.
Referenced by advanceToNextField(), getArrayIndex(), getArraySize(), and isFinished().
ArrayRangeIter clang::reorder_fields::Designator::ArrayRangeIt |
Definition at line 115 of file Designator.h.
Referenced by advanceToNextField(), getArrayRangeEnd(), getArrayRangeStart(), getArraySize(), and isFinished().
StructIter clang::reorder_fields::Designator::StructIt |
Definition at line 113 of file Designator.h.
Referenced by advanceToNextField(), getStructDecl(), getStructIter(), and isFinished().