[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 10:20:11 PST 2024
================
@@ -1885,6 +1885,13 @@ def Leaf : InheritableAttr {
let SimpleHandler = 1;
}
+def ExplicitInit : InheritableAttr {
+ let Spellings = [Clang<"requires_explicit_initialization", 1>];
----------------
AaronBallman wrote:
```suggestion
let Spellings = [Clang<"requires_explicit_initialization">];
```
No need for that, it's the default value anyway.
https://github.com/llvm/llvm-project/pull/102040
More information about the cfe-commits
mailing list