Skip to content
Unverified Commit ae182615 authored by Steven Perron's avatar Steven Perron Committed by GitHub
Browse files

Validate uses of ids defined in unreachable blocks. (#2146)

* Validate uses of ids defined in unreachable blocks.

For some reason we do not make sure the uses of ids that are defined
in unreachable blocks are dominated by their def.  This is causing
invalid code to pass the validator.

Fixes #2143

* Add test for unreachable code after a return.

We want to allow code like:

```
void foo() {
  a = ...;
  ...
    return; // for debugging
  <use of a>;
  ...
}
```

I added a test to make sure that something like this is still accepted
by the validator.

* Add test for unreachable def used in phi.
parent 3596b383
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment