[clang] [clang] Allow __builtin_unpredictable in constant expressions (PR #228256)

Paweł Bylica via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 03:07:08 PDT 2026


chfast wrote:

> Could you detail what claude did, what you did, and how you went about reviewing? Verifying that the test cases work is not sufficient.

I asked Claude to find all occurrences of `__builtin_expect_with_probability` and add sibling support for `__builtin_unpredictable` in the places related to constexpr evaluation and report back places where support is irrelevant. Then I reviewed the work. So this adds support in TD definition + 2 places (i.e. skip the builtin as the "expect" family), skipping the one in SemaChecking.cpp.

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


More information about the cfe-commits mailing list