mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Replace recently-added IsInOut bit with simpler check, NFC
Thanks to @lattner for the suggestion.
This commit is contained in:
@@ -387,10 +387,8 @@ mapParsedParameters(Parser &parser,
|
||||
// If a type was provided, create the type for the parameter.
|
||||
if (auto type = paramInfo.Type) {
|
||||
// If 'inout' was specified, turn the type into an in-out type.
|
||||
if (specifierKind == Parser::ParsedParameter::InOut) {
|
||||
if (specifierKind == Parser::ParsedParameter::InOut)
|
||||
type = new (ctx) InOutTypeRepr(type, paramInfo.LetVarInOutLoc);
|
||||
param->setInOut(true);
|
||||
}
|
||||
|
||||
param->getTypeLoc() = TypeLoc(type);
|
||||
} else if (paramContext != Parser::ParameterContextKind::Closure) {
|
||||
|
||||
Reference in New Issue
Block a user