-
Notifications
You must be signed in to change notification settings - Fork 157
[APINotes] Honor Swift 4 API notes in Swift 3 mode. #122
[APINotes] Honor Swift 4 API notes in Swift 3 mode. #122
Conversation
| Results[Selected].first > Results[i].first) { | ||
| Selected = i; | ||
| } | ||
| break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. This break is wrong. Either I need a test to catch this, or I should guarantee that the list is always sorted.
More generally, change the meaning of the SwiftVersions section to be "this version or earlier" rather than "exactly this version". This keeps us from having to duplicate information for builds of Swift that support more than two possible versions (e.g. 3, 4, and 5).
No functionality change.
aa786ad to
202145d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice testing.
| llvm::function_ref<void(raw_ostream &out, | ||
| const typename MakeDependent<T>::Type& info)> | ||
| emitInfo) { | ||
| std::sort(infoArray.begin(), infoArray.end(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No array_pod_sort, eh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessarily POD, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well. Maybe not by the language definition., but it'd work. std::sort() is not exactly a small thing to instantiate.
…qual [APINotes] Honor Swift 4 API notes in Swift 3 mode. (cherry picked from commit 772e04d)
More generally, change the meaning of the SwiftVersions section to be "this version or earlier" rather than "exactly this version". This keeps us from having to duplicate information for builds of Swift that support more than two possible versions (e.g. 3, 4, and 5).