HomePhabricator

[APINotes] Record what version caused an annotation to get replaced. (#123)

Authored by jordan_rose on Sep 14 2017, 5:15 PM.

Description

[APINotes] Record what version caused an annotation to get replaced. (#123)

Now that -fapinotes-swift-version=3 can pick up API notes for
"Version: 4", the information for /inactive/ API notes isn't
sufficient to tell what would have happened under a different version.
That is, I can't ask "what would happen under version 4", because I
can't tell if the active annotations are active because they were
specified for version 3 or version 4. The inactive, unversioned
attributes were no help, either: they just said "version 0".

Fix this by adding a new flag 'IsReplacedByActive' to
SwiftVersionedAttr and SwiftVersionedRemovalAttr. When set, the
'Version' field refers to the API note that caused this annotation to
become inactive.

Note that "version 0" can still exist: when an attribute written in
source is replaced by an unversioned attribute in the API notes.

apple-llvm-split-commit: b9c72518b27163388c82f3fa5f2577c49a868070
apple-llvm-split-dir: clang/

Details

Committed
GitHub <noreply@github.com>Sep 14 2017, 5:15 PM
Parents
rG2010d9a684e6: Merge in last-known-good-merge.
Branches
Unknown
Tags
Unknown