[NFC] ParamDecl: Extract write of type-checked default expr into its own method

This commit is contained in:
Anthony Latsis
2023-12-21 04:45:29 +03:00
parent 61bdbd2fe3
commit 1d3a5860e2
6 changed files with 43 additions and 26 deletions

View File

@@ -370,7 +370,7 @@ class Traversal : public ASTVisitor<Traversal, Expr*, Stmt*,
if (auto *E = P->getStructuralDefaultExpr()) {
auto res = doIt(E);
if (!res) return true;
P->setDefaultExpr(res, /*isTypeChecked*/ (bool)res->getType());
P->setDefaultExpr(res);
}
if (!Walker.shouldWalkAccessorsTheOldWay()) {