swift
8be78da6 - [Swiftify] Do not swiftify non-Swift-like counted_by exprs

Commit
148 days ago
[Swiftify] Do not swiftify non-Swift-like counted_by exprs __counted_by (and __sized_by) expressions can have arbitrary C syntax in them, such as: void foo(int * __counted_by(*len) p, int *len); When @_SwififyImport tries to generate Swift code for this, the expression `*len` leads to a syntax error, since it isn't valid Swift. This patch adds a check to ensure we only attach the Swiftify macro to __counted_by expressions that are also syntactically valid in Swift. rdar://150956352 (cherry picked from commit e5b1f4a2512a18cb00f3f376636428e668cde8f6)
Author
Committer
Parents
Loading