mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:54:49 +01:00
Rename files to use "expr" and "deref" (#3426)
Follows #3425 and #3375 .
This commit is contained in:
+2
-2
@@ -4,12 +4,12 @@
|
||||
//
|
||||
// AUTOUPDATE
|
||||
|
||||
// CHECK:STDERR: fail_dereference_error.carbon:[[@LINE+3]]:15: ERROR: Name `undeclared` not found.
|
||||
// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+3]]:15: ERROR: Name `undeclared` not found.
|
||||
// CHECK:STDERR: let n: i32 = *undeclared;
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
let n: i32 = *undeclared;
|
||||
|
||||
// CHECK:STDOUT: file "fail_dereference_error.carbon" {
|
||||
// CHECK:STDOUT: file "fail_deref_error.carbon" {
|
||||
// CHECK:STDOUT: %undeclared.ref: <error> = name_ref undeclared, <error>
|
||||
// CHECK:STDOUT: %.loc10: ref <error> = deref <error>
|
||||
// CHECK:STDOUT: %n: i32 = bind_name n, <error>
|
||||
+2
-2
@@ -5,13 +5,13 @@
|
||||
// AUTOUPDATE
|
||||
|
||||
fn A() {
|
||||
// CHECK:STDERR: fail_dereference_function.carbon:[[@LINE+3]]:4: ERROR: Expression cannot be used as a value.
|
||||
// CHECK:STDERR: fail_deref_function.carbon:[[@LINE+3]]:4: ERROR: Expression cannot be used as a value.
|
||||
// CHECK:STDERR: *A;
|
||||
// CHECK:STDERR: ^
|
||||
*A;
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: file "fail_dereference_function.carbon" {
|
||||
// CHECK:STDOUT: file "fail_deref_function.carbon" {
|
||||
// CHECK:STDOUT: %A: <function> = fn_decl @A
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+2
-2
@@ -7,13 +7,13 @@
|
||||
namespace A;
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_dereference_namespace.carbon:[[@LINE+3]]:4: ERROR: Expression cannot be used as a value.
|
||||
// CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+3]]:4: ERROR: Expression cannot be used as a value.
|
||||
// CHECK:STDERR: *A;
|
||||
// CHECK:STDERR: ^
|
||||
*A;
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: file "fail_dereference_namespace.carbon" {
|
||||
// CHECK:STDOUT: file "fail_deref_namespace.carbon" {
|
||||
// CHECK:STDOUT: %.loc7: <namespace> = namespace {}
|
||||
// CHECK:STDOUT: %F: <function> = fn_decl @F
|
||||
// CHECK:STDOUT: }
|
||||
+4
-4
@@ -5,15 +5,15 @@
|
||||
// AUTOUPDATE
|
||||
|
||||
fn Deref(n: i32) {
|
||||
// CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `i32`.
|
||||
// CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `i32`.
|
||||
// CHECK:STDERR: *n;
|
||||
// CHECK:STDERR: ^
|
||||
*n;
|
||||
// CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `() as type`.
|
||||
// CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `() as type`.
|
||||
// CHECK:STDERR: *();
|
||||
// CHECK:STDERR: ^
|
||||
*();
|
||||
// CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `{} as type`.
|
||||
// CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `{} as type`.
|
||||
// CHECK:STDERR: *{};
|
||||
// CHECK:STDERR: ^
|
||||
*{};
|
||||
@@ -24,7 +24,7 @@ fn Deref(n: i32) {
|
||||
// CHECK:STDOUT: %.loc19: type = struct_type {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file "fail_dereference_not_pointer.carbon" {
|
||||
// CHECK:STDOUT: file "fail_deref_not_pointer.carbon" {
|
||||
// CHECK:STDOUT: %Deref: <function> = fn_decl @Deref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+3
-3
@@ -4,15 +4,15 @@
|
||||
//
|
||||
// AUTOUPDATE
|
||||
|
||||
// CHECK:STDERR: fail_dereference_type.carbon:[[@LINE+6]]:8: ERROR: Cannot dereference operand of non-pointer type `type`.
|
||||
// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+6]]:8: ERROR: Cannot dereference operand of non-pointer type `type`.
|
||||
// CHECK:STDERR: var p: *i32;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_dereference_type.carbon:[[@LINE+3]]:8: To form a pointer type, write the `*` after the pointee type.
|
||||
// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+3]]:8: To form a pointer type, write the `*` after the pointee type.
|
||||
// CHECK:STDERR: var p: *i32;
|
||||
// CHECK:STDERR: ^
|
||||
var p: *i32;
|
||||
|
||||
// CHECK:STDOUT: file "fail_dereference_type.carbon" {
|
||||
// CHECK:STDOUT: file "fail_deref_type.carbon" {
|
||||
// CHECK:STDOUT: %.loc13: ref <error> = deref i32
|
||||
// CHECK:STDOUT: %p.var: ref <error> = var p
|
||||
// CHECK:STDOUT: %p: ref <error> = bind_name p, %p.var
|
||||
Reference in New Issue
Block a user