@@ -585,7 +585,7 @@ void DefFormat::genStructParser(StructDirective *el, FmtContext &ctx,
585585 os.getStream ().printReindented (strfmt (checkParamKey, param->getName ()));
586586 if (isa<ParameterElement>(arg))
587587 genVariableParser (param, ctx, os.indent ());
588- else if (auto custom = dyn_cast<CustomDirective>(arg))
588+ else if (auto * custom = dyn_cast<CustomDirective>(arg))
589589 genCustomParser (custom, ctx, os.indent ());
590590 os.unindent () << " } else " ;
591591 // Print the check for duplicate or unknown parameter.
@@ -877,9 +877,9 @@ void DefFormat::genCommaSeparatedPrinter(
877877 extra (arg);
878878 shouldEmitSpace = false ;
879879 lastWasPunctuation = true ;
880- if (auto realParam = dyn_cast<ParameterElement>(arg))
880+ if (auto * realParam = dyn_cast<ParameterElement>(arg))
881881 genVariablePrinter (realParam, ctx, os);
882- else if (auto custom = dyn_cast<CustomDirective>(arg))
882+ else if (auto * custom = dyn_cast<CustomDirective>(arg))
883883 genCustomPrinter (custom, ctx, os);
884884 if (param->isOptional ())
885885 os.unindent () << " }\n " ;
@@ -1124,7 +1124,7 @@ DefFormatParser::verifyStructArguments(SMLoc loc,
11241124 return emitError (loc, " expected a parameter, custom directive or params "
11251125 " directive in `struct` arguments list" );
11261126 }
1127- if (auto custom = dyn_cast<CustomDirective>(el)) {
1127+ if (auto * custom = dyn_cast<CustomDirective>(el)) {
11281128 if (custom->getNumElements () != 1 ) {
11291129 return emitError (loc, " `struct` can only contain `custom` directives "
11301130 " with a single argument" );
0 commit comments