Lines Matching defs:initializer
377 createVariableDecl(StringRef name, SMRange loc, ast::Expr *initializer,
2342 // Parse the optional initializer expression.
2343 ast::Expr *initializer = nullptr;
2348 initializer = *initOrFailure;
2350 // Check that the constraints are compatible with having an initializer,
2372 createVariableDecl(varName, varLoc, initializer, constraints);
2541 Parser::createVariableDecl(StringRef name, SMRange loc, ast::Expr *initializer,
2544 // constraint or an initializer expression.
2549 if (initializer) {
2550 // Update the variable type based on the initializer, or try to convert the
2551 // initializer to the existing type.
2553 type = initializer->getType();
2554 else if (ast::Type mergedType = type.refineWith(initializer->getType()))
2556 else if (failed(convertExpressionTo(initializer, type)))
2559 // Otherwise, if there is no initializer check that the type has already
2565 "list or the initializer");
2576 defineVariableDecl(name, loc, type, initializer, constraints);