[ffigen] Parse ns_returns_retained
and ns_consumed
for blocks
#1490
Labels
ns_returns_retained
and ns_consumed
for blocks
#1490
We have all the infra for handling these annotations in ffigen, but libclang doesn't seem to have a way of accessing
__attribute__((ns_returns_retained))
and__attribute__((ns_consumed))
annotations on blocks.For methods and top level functions, these annotations are on the
CXCursor
of the declaration, but for blocks I only have aCXType
with no declaration cursor. If I annotate a block withNS_RETURNS_RETAINED
, theCXType
's kind changes fromFunctionProto
toUnexposed
. If I annotate it with__attribute__((ns_returns_retained))
the kind changes toAttributed
, which is a bit more promising, but I can't find a way of getting the attribute. If I annotate one of the args with__attribute__((ns_consumed))
, nothing happens at all.The text was updated successfully, but these errors were encountered: