@@ -1006,7 +1006,7 @@ DefFormatParser::verifyOptionalGroupElements(llvm::SMLoc loc,
10061006 } else if (auto *custom = dyn_cast<CustomDirective>(el)) {
10071007 for (FormatElement *el : custom->getArguments ()) {
10081008 // If the custom argument is a variable, then it must be optional.
1009- if (auto param = dyn_cast<ParameterElement>(el))
1009+ if (auto * param = dyn_cast<ParameterElement>(el))
10101010 if (!param->isOptional ())
10111011 return emitError (loc,
10121012 " `custom` is only allowed in an optional group if "
@@ -1023,10 +1023,11 @@ DefFormatParser::verifyOptionalGroupElements(llvm::SMLoc loc,
10231023 }
10241024 // If the anchor is a custom directive, make sure at least one of its
10251025 // arguments is a bound parameter.
1026- if (auto custom = dyn_cast<CustomDirective>(anchor)) {
1027- auto bound = llvm::find_if (custom->getArguments (), [](FormatElement *el) {
1028- return isa<ParameterElement>(el);
1029- });
1026+ if (auto *custom = dyn_cast<CustomDirective>(anchor)) {
1027+ const auto *bound =
1028+ llvm::find_if (custom->getArguments (), [](FormatElement *el) {
1029+ return isa<ParameterElement>(el);
1030+ });
10301031 if (bound == custom->getArguments ().end ())
10311032 return emitError (loc, " `custom` directive with no bound parameters "
10321033 " cannot be used as optional group anchor" );
0 commit comments