| 4549 | //----------------------------------------------------------------------------- |
| 4550 | |
| 4551 | void CodeGenerator::FormatCast(const std::string_view castName, |
| 4552 | const QualType& castDestType, |
| 4553 | const Expr* subExpr, |
| 4554 | const CastKind& castKind) |
| 4555 | { |
| 4556 | const bool isCastToBase{is{castKind}.any_of(CK_DerivedToBase, CK_UncheckedDerivedToBase) and |
| 4557 | castDestType->isRecordType()}; |
| 4558 | const std::string castDestTypeText{ |
| 4559 | StrCat(GetName(castDestType), ((isCastToBase and not castDestType->isAnyPointerType()) ? "&"sv : ""sv))}; |
| 4560 | |
| 4561 | mOutputFormatHelper.Append(castName, "<"sv, castDestTypeText, ">("sv); |
| 4562 | InsertArg(subExpr); |
| 4563 | mOutputFormatHelper.Append(')'); |
| 4564 | } |
| 4565 | //----------------------------------------------------------------------------- |
| 4566 | |
| 4567 | void CodeGenerator::InsertArgWithParensIfNeeded(const Stmt* stmt) |