[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 30 12:27:26 PST 2025
erichkeane wrote:
> It turns out we weren't handling one case: the value-initialization of a field inside a struct.
>
> I'm not sure why this falls under `IK_Direct` rather than `IK_Value` in Clang, but it seems to work.
Looks like (according to item 6 here) https://en.cppreference.com/w/cpp/language/direct_initialization
That member init is always 'direct' initialization.
https://github.com/llvm/llvm-project/pull/124329
More information about the cfe-commits
mailing list