================ @@ -1419,6 +1419,28 @@ is not specified. }]; } +def ExplicitInitDocs : Documentation { + let Category = DocCatField; + let Content = [{ +The ``clang::explicit_init`` attribute indicates that the field must be +initialized explicitly by the caller when the class is constructed. ---------------- ilya-biryukov wrote:
Thanks! LG! > we might want to forbid its usage on non-aggregates entirely. I guess we could simply warn if the class in which the field is used is non-aggregate, but that entails the problems that were raised with the changed semantics of what's aggregate between C++17 and C++20 (especially if people use `Werror`). I guess having a warning that is off by default is a no-brainer, it clearly adds value **if** people want it. But it might also happen that nobody uses it and the work for it is wasted. Or we could simply document that the attribute is ignored for non-aggregate types in the documentation. https://github.com/llvm/llvm-project/pull/102040 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits