================
@@ -3426,6 +3428,27 @@ static void mergeParamDeclAttributes(ParmVarDecl 
*newDecl,
            diag::note_carries_dependency_missing_first_decl) << 1/*Param*/;
   }
 
+  // C++26 [dcl.attr.indet]/p2:
+  // If a function parameter is declared with the indeterminate attribute, it
+  // shall be so declared in the first declaration of its function. If a
+  // function parameter is declared with the indeterminate attribute in the
+  // first declaration of its function in one translation unit and the same
+  // function is declared without the indeterminate attribute on the same
+  // parameter in its first declaration in another translation unit, the 
program
+  // is ill-formed, no diagnostic required.
+  if (S.getLangOpts().CPlusPlus26) {
----------------
erichkeane wrote:

These are still valuable warnings in pre-26, IMO, we should apply this 
attribute as an extension backwards.

https://github.com/llvm/llvm-project/pull/177614
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to