[llvm] [clang] New calling convention preserve_none (PR #76868)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 10 13:23:36 PST 2024


================
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr {
   let Documentation = [M68kRTDDocs];
 }
 
+def PreserveNone : DeclOrTypeAttr {
+  let Spellings = [Clang<"preserve_none">];
----------------
weiguozhi wrote:

I tried to add
```
  let Subjects = SubjectList<[Function]>;
```
But it doesn't work for the code
```
  void __attribute__((preserve_none)) boo(void *ptr) {
  }

  void (__attribute__((preserve_none)) *pboo1)(void *) = boo;
```
I got the error message
```
'preserve_none' attribute only applies to functions
```


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


More information about the cfe-commits mailing list