[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 25 06:44:15 PST 2024


ilya-biryukov wrote:

re the C++20 init: the code that handles this is here: https://github.com/llvm/llvm-project/blob/2d62daab497bfe1991869dc090c7d20a71108360/clang/lib/Sema/SemaInit.cpp#L5857

You will probably have to update it accordingly.

I believe it would be ideal that this code was shared with `FillEmptyFieldInitializer`, however it is not.
Looking at both places, I suspect we are actually missing some interesting functionality for C++20 paren initializers, e.g. for code like this https://github.com/llvm/llvm-project/blob/2d62daab497bfe1991869dc090c7d20a71108360/clang/lib/Sema/SemaInit.cpp#L769

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


More information about the cfe-commits mailing list