mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 18:05:51 +01:00
Switch constexpr factory functions to constexpr values. (#2581)
Using the same const/constexpr done in EnumBase, adds Invalid and Builtin* values to replace Make functions that produced the same. This should make it clearer at call sites what the cost actually is, and reduces the syntactic overhead for MakeBuiltinReference in particular. Really, this is that MakeBuiltinReference has been feeling pretty verbose, so I did that, and then one MakeInvalid is right next to it, and then obviously I should replace the other MakeInvalid for consistency...
This commit is contained in:
@@ -36,9 +36,8 @@ class SemanticsNodeStack {
|
||||
// Pushes a solo parse tree node onto the stack. Used when there is no
|
||||
// IR generated by the node.
|
||||
auto Push(ParseTree::Node parse_node) -> void {
|
||||
PushEntry(
|
||||
{.parse_node = parse_node, .node_id = SemanticsNodeId::MakeInvalid()},
|
||||
DebugLog::None);
|
||||
PushEntry({.parse_node = parse_node, .node_id = SemanticsNodeId::Invalid},
|
||||
DebugLog::None);
|
||||
}
|
||||
|
||||
// Pushes a parse tree node onto the stack.
|
||||
|
||||
Reference in New Issue
Block a user