[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 14 10:06:26 PDT 2025


================
@@ -9242,3 +9242,15 @@ Declares that a function potentially allocates heap memory, and prevents any pot
 of ``nonallocating`` by the compiler.
   }];
 }
+
+def ValueTypeDocs : Documentation {
+  let Category = DocCatDecl;
+  let Content = [{
+The ``value_type`` attribute can be used to mark user-defined types as 'value
+types'. When objects of value types are passed value to functions, the objects
----------------
erichkeane wrote:

```suggestion
types'. When objects of value types are passed by value to functions, the objects
```

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


More information about the cfe-commits mailing list