Commit Graph

109 Commits

Author SHA1 Message Date
Doug Gregor
cded58955e Make %select{} formatting recursive.
Swift SVN r1884
2012-05-17 15:42:10 +00:00
Doug Gregor
7e9b7da0ca Remove the general diagnostic-suppression mechanism. Instead,
introduce a simple suppression mechanism into the type-coercion code,
which is the only place we should need it.


Swift SVN r1388
2012-04-11 14:31:40 +00:00
Doug Gregor
79ed496d87 Implement filtering of overload sets based on argument and destination
types. Use this simple overload resolution scheme in both type
checking and type coercion, simplifying both code paths a bit.

There is one significant semantic change here: we allow overload
resolution to operate on (structured) dependent arguments, which
allows for more overload filtering before we come in with the type
coercion hammer. For example, we can now properly type-check

  var x : int32;
  x + 0;



Swift SVN r1310
2012-04-02 23:22:01 +00:00
Doug Gregor
fc183b9cc3 Decouple the lexer from the ASTContext and specific BufferID. They
aren't needed for the lexer proper (which just needs a buffer to dig
through). Also, make it possible to suppress lexer diagnostics merely
by not giving it a diagnostic engine to work with.


Swift SVN r852
2011-11-09 21:49:40 +00:00
Doug Gregor
725298a2da Introduce a DiagnosticConsumer abstract interface that is used to
actually render emitted diagnostics. This is both a useful
generalization (we expect to have a number of other
DiagnosticConsumers down the road, as Clang does) and is also
important now to avoid a layering violation when adjusting the source
location at the end of a SourceRange to the end of the token.

 


Swift SVN r850
2011-11-09 18:59:39 +00:00
Doug Gregor
cd7a21de83 Introduce support for adding source ranges to diagnostics.
We don't yet properly perform the SourceRange -> llvm::SMRange mapping. 

Swift SVN r847
2011-11-09 17:53:30 +00:00
Doug Gregor
e12215b1be Introduce InFlightDiagnostic, a move-only class that will be used to emit "extra" information (ranges, Fix-Its, etc.) for a diagnostic. It's quite similar in design to Clang's DiagnosticBuilder, but slightly cleaner/more restrictive.
Note that I had to re-implement llvm::Optional, since it lamely requires a default constructor. At some point, I'll push a proper implementation back to LLVM.

Swift SVN r845
2011-11-09 17:19:30 +00:00
Chris Lattner
9298082ebb move Diagnostics header to include/swift/AST to match .cpp files.
Swift SVN r782
2011-10-22 00:47:35 +00:00
Chris Lattner
30b6007b61 move the diagnostics stuff from Basic -> AST to fix layering.
Swift SVN r781
2011-10-22 00:41:24 +00:00