Commits

Devin Coughlin committed 749f8500d65
Sema: Emit Fix-Its for potential unavailability We now suggest up to three Fix-Its for each reference to a potentially unavailable symbol: one to wrap the reference in an if #os(...) { ... } guard (if possible), one to add an @availability attribute to an enclosing property or method (if possible), and one to add an @availability attribute to an enclosing class/struct/extension, etc. or global function. The goal here is not to infer the "best" Fix-It but rather to ensure discoverability of #os() and @availability attributes. We want the user, when faced with an availability diagnostic, to be aware of the tools in her toolbox to deal with it. This is still missing QoI improvements, including Fix-Its to update existing @availability attributes and more precise wording in diagnostics (e.g, "initializer" instead of function, "class" instead of "type"). These improvements will come in later commits. Swift SVN r26073