clang-tools 22.0.0git
|
Public Member Functions | |
ReorderedStruct (const RecordDecl *Decl, ArrayRef< unsigned > NewFieldsOrder) | |
bool | operator() (const Designator &Lhs, const Designator &Rhs) const |
Compares compatible designators according to the new struct order. | |
bool | operator() (const Designators &Lhs, const Designators &Rhs) const |
Compares compatible designator lists according to the new struct order. |
Public Attributes | |
const RecordDecl * | Definition |
ArrayRef< unsigned > | NewFieldsOrder |
SmallVector< unsigned, 4 > | NewFieldsPositions |
Definition at line 183 of file ReorderFieldsAction.cpp.
|
inline |
Definition at line 185 of file ReorderFieldsAction.cpp.
References Definition, NewFieldsOrder, and NewFieldsPositions.
bool clang::reorder_fields::ReorderedStruct::operator() | ( | const Designator & | Lhs, |
const Designator & | Rhs ) const |
Compares compatible designators according to the new struct order.
Returns a negative value if Lhs < Rhs, positive value if Lhs > Rhs and 0 if they are equal.
Definition at line 207 of file ReorderFieldsAction.cpp.
References clang::reorder_fields::Designator::ARRAY, clang::reorder_fields::Designator::ARRAY_RANGE, Definition, clang::reorder_fields::Designator::getArrayIndex(), clang::reorder_fields::Designator::getArrayRangeStart(), clang::reorder_fields::Designator::getStructDecl(), clang::reorder_fields::Designator::getStructIter(), clang::reorder_fields::Designator::getTag(), NewFieldsPositions, and clang::reorder_fields::Designator::STRUCT.
bool clang::reorder_fields::ReorderedStruct::operator() | ( | const Designators & | Lhs, |
const Designators & | Rhs ) const |
Compares compatible designator lists according to the new struct order.
Returns a negative value if Lhs < Rhs, positive value if Lhs > Rhs and 0 if they are equal.
Definition at line 238 of file ReorderFieldsAction.cpp.
References clang::reorder_fields::Designators::begin(), and clang::reorder_fields::Designators::end().
const RecordDecl* clang::reorder_fields::ReorderedStruct::Definition |
Definition at line 202 of file ReorderFieldsAction.cpp.
Referenced by operator()(), ReorderedStruct(), and clang::reorder_fields::reorderFieldsInDefinition().
ArrayRef<unsigned> clang::reorder_fields::ReorderedStruct::NewFieldsOrder |
Definition at line 203 of file ReorderFieldsAction.cpp.
Referenced by ReorderedStruct(), clang::reorder_fields::reorderFieldsInDefinition(), and clang::reorder_fields::reorderFieldsInInitListExpr().
SmallVector<unsigned, 4> clang::reorder_fields::ReorderedStruct::NewFieldsPositions |
Definition at line 204 of file ReorderFieldsAction.cpp.
Referenced by operator()(), ReorderedStruct(), and clang::reorder_fields::reorderFieldsInConstructor().