[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:32 PDT 2025


================
@@ -1972,6 +1972,16 @@ def TrivialABI : InheritableAttr {
   let SimpleHandler = 1;
 }
 
+def ValueType : InheritableAttr {
+  // This attribute does not have a C [[]] spelling because it requires the
+  // CPlusPlus language option.
+  let Spellings = [Clang<"value_type", 0>];
+  let Subjects = SubjectList<[CXXRecord]>;
+  let Documentation = [TrivialABIDocs];
----------------
erichkeane wrote:

Why are we adding docs, but setting the documentation link here to something else?

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


More information about the cfe-commits mailing list