Files
carbon-lang/toolchain/check/testdata/basics/parens.carbon
T
Jon Ross-Perkins 8ace1dcb78 Remove BinaryOperatorAdd (#3469)
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.
2023-12-08 01:06:19 +00:00

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: