[PATCH] D87532: Sema: add support for `__attribute__((__swift_bridge__))`
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 09:55:25 PDT 2020
compnerd added inline comments.
================
Comment at: clang/include/clang/Basic/Attr.td:2133
+def SwiftBridge : Attr {
+ let Spellings = [GNU<"swift_bridge">];
----------------
aaron.ballman wrote:
> Is this a type or a declaration attribute? It looks like a declaration attribute based on the declaration and the list of subjects, but it looks like a type based on the `ExpectedType` diagnostic and the documentation. Or is this one of those unholy GNU attributes that's confused about what it appertains to?
>
> Should this be inherited by redeclarations? Might be worth adding a test:
> ```
> struct __attribute__((swift_bridge)) S;
>
> struct S { // Should still have the attribute
> int i;
> };
> ```
It is a declaration attribute, and yes, it should be inheritable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87532/new/
https://reviews.llvm.org/D87532
More information about the cfe-commits
mailing list