usx95 wrote:

I do not think the issue is a no-returning CFGBlock. E.g. the `noreturn` 
example works fine.

```cpp
[[noreturn]] int* terminate();

bool cond;
int* f() {
    int p;
    return cond ? &p : terminate();
}
```
https://godbolt.org/z/1rTdEvGKo

 The crash is because the `CXXThrowExpr` has a type `void` in the AST which has 
no origins while the destinations have.

So this indeed looks like a special case of a throw expression and not specific 
to control flow. WDYT @Xazax-hun 

https://github.com/llvm/llvm-project/pull/190345
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to