mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add name_reference SemIR node for references to names. (#3260)
Also add `name_reference_untyped` for references to non-first-class names without types, which currently covers namespaces and functions. This improves the fidelity of the SemIR representation, and fixes some issues where we would use the wrong location for nodes and diagnostics downstream of a name reference. We're still missing a representation for dotted name expressions, such as `Namespace.Function`, and we don't use the `untyped` node as an operand of any other node yet.
This commit is contained in:
@@ -17,6 +17,7 @@ fn G() { F(); }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref = name_reference_untyped "F", package.%F
|
||||
// CHECK:STDOUT: %.loc9_11.1: type = tuple_type ()
|
||||
// CHECK:STDOUT: %.loc9_11.2: init () = call @F()
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
Reference in New Issue
Block a user