[clang-tools-extra] [clang-tidy] Limit modernize-use-constraints to standard enable_if (PR #155237)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 25 13:20:35 PDT 2025


vbvictor 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)

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

https://github.com/llvm/llvm-project/pull/155237


More information about the cfe-commits mailing list