Commits

Doug Gregor committed 319a1001896
Allow diagnostics to accept declarations in lieu of source locations. Swift's diagnostic system is built on the quaint notion that every declaration known to the front end has a valid source location to which diagnostics mentioning that declaration (say, in a "here is a candidate" note) can point. However, with a real module system, the source corresponding to a declaration in a module does not need to be present, so we can't rely on source locations. Instead of source locations, allow diagnostics to be anchored at a declaration. If that declaration has source-location information, it is used. Otherwise, we just drop source-location information for now. In the future, we'll find a better way to render this information so it feels natural for the programmer. Swift SVN r3413