mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Parsing, semantic analysis, and lowering for and, or, not. (#2897)
Lowering for `and` and `or` is not yet complete because `Branch` lowering isn't done yet.
This commit is contained in:
@@ -13,9 +13,7 @@ auto SemanticsHandleIfExpressionIf(SemanticsContext& context,
|
||||
context.node_stack().Push(if_node);
|
||||
|
||||
// Convert the condition to `bool`.
|
||||
cond_value_id = context.ImplicitAsRequired(
|
||||
if_node, cond_value_id,
|
||||
context.CanonicalizeType(SemanticsNodeId::BuiltinBoolType));
|
||||
cond_value_id = context.ImplicitAsBool(if_node, cond_value_id);
|
||||
|
||||
// Stop emitting the current block. We'll add some branch instructions to it
|
||||
// later, but we don't want it on the stack any more.
|
||||
|
||||
Reference in New Issue
Block a user