[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 04:43:13 PDT 2024


Xazax-hun wrote:

I think the interesting template cases are like things like:

```
template<typename T> struct S {
  T foo();
};

S<int> a;
S<SWIFT_SENDABLE int> b;

void f() {
  a.foo();
  b.foo();
}
```

The question is, whether we actually have the type attributes where we expect to have them, or do we lose them?
Hopefully @erichkeane can correct me if I'm wrong. 

That being said, one question is whether we actually need type attributes to be propagated in this case for Swift's interop. 

For the release notes, you'd want to mention that `swift_attr` can now be applied to types (maybe a small motivation why) in `clang/docs/ReleaseNotes.rst`. It has a section for attribute changes. 


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


More information about the cfe-commits mailing list