@@ -951,7 +951,7 @@ class Pass {
951
951
}
952
952
}
953
953
954
- virtual void file (AST *body, Fodder &final_fodder)
954
+ virtual void file (AST *& body, Fodder &final_fodder)
955
955
{
956
956
expr (body);
957
957
fodder (final_fodder);
@@ -960,6 +960,7 @@ class Pass {
960
960
961
961
962
962
class EnforceStringStyle : public Pass {
963
+ using Pass::visit;
963
964
public:
964
965
EnforceStringStyle (Allocator &alloc, const FmtOpts &opts) : Pass(alloc, opts) { }
965
966
void visit (LiteralString *lit)
@@ -1108,6 +1109,7 @@ bool contains_newline(const Fodder &fodder)
1108
1109
1109
1110
/* Commas should appear at the end of an object/array only if the closing token is on a new line. */
1110
1111
class FixTrailingCommas : public Pass {
1112
+ using Pass::visit;
1111
1113
public:
1112
1114
FixTrailingCommas (Allocator &alloc, const FmtOpts &opts) : Pass(alloc, opts) { }
1113
1115
Fodder comments;
@@ -1182,6 +1184,7 @@ class FixTrailingCommas : public Pass {
1182
1184
1183
1185
/* Remove nested parens. */
1184
1186
class FixParens : public Pass {
1187
+ using Pass::visit;
1185
1188
public:
1186
1189
FixParens (Allocator &alloc, const FmtOpts &opts) : Pass(alloc, opts) { }
1187
1190
void visit (Parens *expr)
@@ -1200,6 +1203,7 @@ class FixParens : public Pass {
1200
1203
1201
1204
/* Ensure ApplyBrace syntax sugar is used in the case of A + { }. */
1202
1205
class FixPlusObject : public Pass {
1206
+ using Pass::visit;
1203
1207
public:
1204
1208
FixPlusObject (Allocator &alloc, const FmtOpts &opts) : Pass(alloc, opts) { }
1205
1209
void visitExpr (AST *&expr)
@@ -1225,6 +1229,7 @@ class FixPlusObject : public Pass {
1225
1229
1226
1230
/* Remove final colon in slices. */
1227
1231
class NoRedundantSliceColon : public Pass {
1232
+ using Pass::visit;
1228
1233
public:
1229
1234
NoRedundantSliceColon (Allocator &alloc, const FmtOpts &opts) : Pass(alloc, opts) { }
1230
1235
@@ -1243,6 +1248,7 @@ class NoRedundantSliceColon : public Pass {
1243
1248
1244
1249
/* Ensure syntax sugar is used where possible. */
1245
1250
class PrettyFieldNames : public Pass {
1251
+ using Pass::visit;
1246
1252
public:
1247
1253
PrettyFieldNames (Allocator &alloc, const FmtOpts &opts) : Pass(alloc, opts) { }
1248
1254
0 commit comments