mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 19:55:11 +00:00
BinaryOperatorAdd had been added early on as a proof-of-concept for toolchain design for parsing -> checking flow. However, it doesn't reflect the interface direction for operators, and now other portions of the toolchain demonstrate the relevant logic. Instead, it's just a bit of an outlier versus other instructions which have evolved over time.
24 lines
800 B
Plaintext
24 lines
800 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
var a: i32 = (1);
|
|
var b: i32 = ((2));
|
|
|
|
// CHECK:STDOUT: --- parens.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace {.a = %a, .b = %b}
|
|
// CHECK:STDOUT: %a.var: ref i32 = var a
|
|
// CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var
|
|
// CHECK:STDOUT: %.loc7: i32 = int_literal 1
|
|
// CHECK:STDOUT: assign %a.var, %.loc7
|
|
// CHECK:STDOUT: %b.var: ref i32 = var b
|
|
// CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
|
|
// CHECK:STDOUT: %.loc8: i32 = int_literal 2
|
|
// CHECK:STDOUT: assign %b.var, %.loc8
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|