@@ -585,7 +585,7 @@ void DefFormat::genStructParser(StructDirective *el, FmtContext &ctx,
585
585
os.getStream ().printReindented (strfmt (checkParamKey, param->getName ()));
586
586
if (isa<ParameterElement>(arg))
587
587
genVariableParser (param, ctx, os.indent ());
588
- else if (auto custom = dyn_cast<CustomDirective>(arg))
588
+ else if (auto * custom = dyn_cast<CustomDirective>(arg))
589
589
genCustomParser (custom, ctx, os.indent ());
590
590
os.unindent () << " } else " ;
591
591
// Print the check for duplicate or unknown parameter.
@@ -877,9 +877,9 @@ void DefFormat::genCommaSeparatedPrinter(
877
877
extra (arg);
878
878
shouldEmitSpace = false ;
879
879
lastWasPunctuation = true ;
880
- if (auto realParam = dyn_cast<ParameterElement>(arg))
880
+ if (auto * realParam = dyn_cast<ParameterElement>(arg))
881
881
genVariablePrinter (realParam, ctx, os);
882
- else if (auto custom = dyn_cast<CustomDirective>(arg))
882
+ else if (auto * custom = dyn_cast<CustomDirective>(arg))
883
883
genCustomPrinter (custom, ctx, os);
884
884
if (param->isOptional ())
885
885
os.unindent () << " }\n " ;
@@ -1124,7 +1124,7 @@ DefFormatParser::verifyStructArguments(SMLoc loc,
1124
1124
return emitError (loc, " expected a parameter, custom directive or params "
1125
1125
" directive in `struct` arguments list" );
1126
1126
}
1127
- if (auto custom = dyn_cast<CustomDirective>(el)) {
1127
+ if (auto * custom = dyn_cast<CustomDirective>(el)) {
1128
1128
if (custom->getNumElements () != 1 ) {
1129
1129
return emitError (loc, " `struct` can only contain `custom` directives "
1130
1130
" with a single argument" );
0 commit comments