Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Conversation

@jrose-apple
Copy link
Contributor

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).

Results[Selected].first > Results[i].first) {
Selected = i;
}
break;
Copy link
Contributor Author

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).
Copy link
Member

@DougGregor DougGregor left a 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(),
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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.

@jrose-apple jrose-apple merged commit 772e04d into apple:upstream-with-swift Sep 15, 2017
@jrose-apple jrose-apple deleted the apinotes-less-than-or-equal branch September 15, 2017 00:06
jrose-apple added a commit to jrose-apple/swift-clang that referenced this pull request Sep 15, 2017
…qual [APINotes] Honor Swift 4 API notes in Swift 3 mode. (cherry picked from commit 772e04d)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants