mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 06:11:05 +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:
@@ -100,6 +100,9 @@ class SemanticsNodeStack {
|
||||
// Prints the stack for a stack dump.
|
||||
auto PrintForStackDump(llvm::raw_ostream& output) const -> void;
|
||||
|
||||
auto empty() const -> bool { return stack_.empty(); }
|
||||
auto size() const -> size_t { return stack_.size(); }
|
||||
|
||||
private:
|
||||
// An entry in stack_.
|
||||
struct Entry {
|
||||
|
||||
Reference in New Issue
Block a user