[clang] [C++26][clang] Implement P2795R5 'Erroneous behaviour for uninitialized reads' (PR #177614)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 06:22:03 PST 2026


================
@@ -4827,6 +4835,20 @@ def Uninitialized : InheritableAttr {
   let Documentation = [UninitializedDocs];
 }
 
+// [dcl.attr.indet]/p1:
+// The attribute-token indeterminate may be applied to the definition of a block variable
+// with automatic storage duration or to a parameter-declaration of a function declaration. 
+// No attribute-argument-clause shall be present. The attribute specifies that the storage
+// of an object with automatic storage duration is initially indeterminate rather than
+// erroneous ([basic.indet]).
+def Indeterminate : InheritableAttr {
+  let Spellings = [CXX11<"", "indeterminate", 202403>];
+  let Subjects = SubjectList<[AutomaticStorageVar]>;
----------------
cor3ntin wrote:

It might be worth asking core?

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


More information about the cfe-commits mailing list