NagyDonat wrote:

> AFAIK, the check now will not crash if `enable_if` with incorrect signature 
> is encountered.
> 
>     * If first arg is not `bool` - bail out
> 
>     * If parameter count is not 1 or to - bail out
> 
>     * If 2nd arg is incorrect - do not warn (As I understand from the tests.. 
> maybe wrong) @localspook do you have more insights?
> 
> 
> So we essentially eliminated all "bad" cases from the check. So I'm a little 
> in favor of keeping as is, but it's not strong opinion since it's a very 
> niche case (considering the bug is already fixed)

Ok, then I'm closing this ticket. I agree that this is a very niche question, 
and I don't see any remaining chances for crashes.

> Could you confirm that bug in https://github.com/Neargye/magic_enum/ is fixed 
> in trunk?

The crash was caused by an `enable_if` variant where the first argument is a 
type (instead of `bool`), so I'm confident that this crash is fixed in trunk. 
(I cannot easily perform an experimental confirmation, but I don't think that 
it's needed.)



https://github.com/llvm/llvm-project/pull/155237
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to