cor3ntin wrote:

> For example, we may need to call EvaluateUnaryTypeTrait twice, in order to 
> determine what type of destruction a C++ type has. The first call would check 
> if the type is trivially-destructible. If so, destruction is a no-op. We'd 
> need to call the function a second time if it returns false, because we don't 
> yet know that the type is destructible. All of that information was derived 
> in the first call, but it gets discarded, and so the toolchain would need to 
> do twice as much work :(

This is probably reasonable?
Your proposed change does lookup twice, which afaik is going to be the most 
expensive bit of the operation anyway?

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

Reply via email to