mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] NFC: De-boilerplate "has ParenType sugar"
This commit is contained in:
@@ -40,7 +40,7 @@ namespace swift {
|
||||
|
||||
// Always make sure to have at least one set of parens
|
||||
bool forceParens =
|
||||
!type->is<TupleType>() && !isa<ParenType>(type.getPointer());
|
||||
!type->is<TupleType>() && !type->hasParenSugar();
|
||||
if (forceParens)
|
||||
result.push_back('(');
|
||||
|
||||
@@ -4110,7 +4110,7 @@ public:
|
||||
// FIXME: Due to a quirk of CSApply, we can end up without a
|
||||
// ParenExpr if the argument has an '@lvalue TupleType'.
|
||||
assert((isa<TupleType>(CS.getType(ArgExpr).getPointer()) ||
|
||||
isa<ParenType>(CS.getType(ArgExpr).getPointer())) &&
|
||||
CS.getType(ArgExpr)->hasParenSugar()) &&
|
||||
"unexpected argument expression type");
|
||||
insertLoc = ArgExpr->getLoc();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user