18 void OutputFormatHelper::Indent(
unsigned count)
20 mOutput.insert(mOutput.size(), count,
' ');
25 const NameOnly nameOnly,
26 const GenMissingParamName genMissingParamName)
35 if((GenMissingParamName::Yes == genMissingParamName) && (0 == name.length())) {
44 if(
const auto type{
GetType(p->getType())}; NameOnly::No == nameOnly) {
50 if(isa<PackExpansionType>(type)) {
60 if(NoNewLineBefore::No == newLineBefore) {
72 void OutputFormatHelper::RemoveIndent()
75 if(0 != mDefaultIndent) {
77 const auto res = std::find_if(
78 std::rbegin(mOutput), std::rbegin(mOutput) + SCOPE_INDENT, [](
const char& c) {
return ' ' != c; });
81 if(
const auto& end = std::rbegin(mOutput); res != end) {
83 mOutput.resize(mOutput.size() - std::distance(end, res));
constexpr std::string_view kwElipsis
void InsertAttributes(const Decl *)
A special container which creates either a CodeGenerator or a CfrontCodeGenerator depending on the co...
QualType GetType(QualType t)
In Cfront mode we transform references to pointers.
std::string GetName(const NamedDecl &nd, const QualifiedName qualifiedName)
std::string BuildInternalVarName(const std::string_view &varName)
std::string GetTypeNameAsParameter(const QualType &t, std::string_view varName, const Unqualified unqualified)
std::string StrCat(const auto &... args)