ojhunt wrote:

I think it's wrong to do this on cast only, your original test cases 
demonstrating devirtualization failure includes 

```cpp
SomeFinalType Foo;
Foo.someMethodThatTransitivelyCallsAVirtualFunction();
```

but your test in this PR doesn't cover that.

We _could_ plant the assumptions on any member access to a final class - 
essentially enumerate all the vtable pointers planting assumptions.

Similarly on entry to a member function. In principle we could even do that for 
final methods, but at some point maybe we should start having some way to 
communicate these invariants to llvm.

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

Reply via email to