mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 18:01:07 +01:00
Move TODOs from CARBON_CHECK to SemanticsTODO diagnostics (#2558)
This change is to make it clearer what is a TODO versus unexpected behavior. I'm doing this now because I feel it's been getting a little confusing in code.
So for example if I write the code a return type `-> i32`, I get the diagnostic output plus the dump of the (invalid) IR:
```
/carbon-lang/toolchain/semantics/testdata/function/basic.carbon:37:10: Semantics TODO: HandleReturnType
cross_reference_irs_size: 1
callables: [
]
integer_literals: [
]
strings: [
]
nodes: [
{kind: CrossReference, arg0: ir0, arg1: block0, type: node0},
{kind: CrossReference, arg0: ir0, arg1: block1, type: node1},
{kind: CrossReference, arg0: ir0, arg1: block2, type: node0},
{kind: CrossReference, arg0: ir0, arg1: block3, type: node0},
]
node_blocks: [
[
],
]
```
This commit is contained in:
@@ -105,9 +105,9 @@ class SemanticsParseTreeHandler {
|
||||
// params_stack_. Returns false if nothing is copied.
|
||||
auto SaveParam() -> bool;
|
||||
|
||||
// Parse node handlers.
|
||||
// Parse node handlers. Returns false for unrecoverable errors.
|
||||
#define CARBON_PARSE_NODE_KIND(Name) \
|
||||
auto Handle##Name(ParseTree::Node parse_node)->void;
|
||||
auto Handle##Name(ParseTree::Node parse_node)->bool;
|
||||
#include "toolchain/parser/parse_node_kind.def"
|
||||
|
||||
auto current_scope() -> ScopeStackEntry& { return scope_stack_.back(); }
|
||||
|
||||
Reference in New Issue
Block a user