HomePhabricator

[APINotes] Always provide an unversioned SwiftName of some kind. (#81)

Authored by jordan_rose on May 8 2017, 8:39 PM.

Description

[APINotes] Always provide an unversioned SwiftName of some kind. (#81)

If the active API notes set a Swift name for a declaration, but no
other versions do, it's assumed that that's the name in every version,
because the AST is indistinguishable from just applying the attribute
in the header. Fix this by explicitly adding an inactive, unversioned
removal attribute for SwiftName in otherwise ambiguous cases.

(This really relates to /all/ annotations in the "SwiftVersions"
section, and particularly those that are usually not written in
headers, but it's particularly bad for SwiftName because the Swift
compiler actually looks at the inactive versions for that one. At
some point it may be worth trying to generalize this, though.)

rdar://problem/31826517

apple-llvm-split-commit: 325fb32cc8b60bafd8d30213a818f96a520436ab
apple-llvm-split-dir: clang/

Details

Committed
GitHub <noreply@github.com>May 8 2017, 8:39 PM
Parents
rG85883947e446: Propagating prior merge from 'llvm.org/master'.
Branches
Unknown
Tags
Unknown