Commit Graph

3 Commits

Author SHA1 Message Date
Chris Lattner
98169c5171 add fixit checks to ClangModules.
Swift SVN r31003
2015-08-04 20:29:37 +00:00
Chris Lattner
6a27182712 two unrelated changes:
- Have DiagnosticEngine produce "aka" annotations for sugared types.
 - Fix the "optional type '@lvalue C?' cannot be used as a boolean; test for '!= nil' instead"
   diagnostic to stop printing @lvalue noise.

This addresses:
<rdar://problem/19036351> QoI: Print minimally-desugared 'aka' types like Clang does



Swift SVN r30587
2015-07-24 20:22:20 +00:00
Jordan Rose
ec98293c5e [ClangImporter] Import 'NSObject <FooProto> *' as 'id <NSObject, FooProto>'.
This is usually a more helpful type than our alternative, 'NSObject', although
it's not Equatable or Hashable. Since pretty much everything from Objective-C
inherits from NSObject, though, keeping the protocol qualifiers is much more
useful from a type-safety perspective.

The particular benefit for this comes with a change to libdispatch's <os/object.h>:
with dispatch types all declaring that they inherit from NSObjectProtocol, the
canonical form of the imported 'dispatch_queue_t' is now just a simple protocol
reference. That's type-safe as above, but is also a type that can be extended.

rdar://problem/16213421

Swift SVN r30100
2015-07-11 00:13:34 +00:00