AST: Replace recently-added IsInOut bit with simpler check, NFC

Thanks to @lattner for the suggestion.
This commit is contained in:
Slava Pestov
2016-08-04 14:47:26 -07:00
parent 045bc16b6d
commit 522f4e4572
6 changed files with 6 additions and 22 deletions

View File

@@ -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) {