Commit Graph

1066 Commits

Author SHA1 Message Date
Chris Lattner
6fcd10e290 deconstify member to make Diag<>'s assignable and otherwise behave as
a proper value type.


Swift SVN r765
2011-10-20 20:27:03 +00:00
Chris Lattner
8c07ba4034 switch parseStmtBrace to the new diagnostics api
Swift SVN r764
2011-10-20 20:18:36 +00:00
Chris Lattner
d8343e9a42 convert parseToken to new diagnostic api
Swift SVN r763
2011-10-20 20:09:04 +00:00
Chris Lattner
96f732b6a2 convert parseType to take a DiagID.
Swift SVN r762
2011-10-20 19:53:00 +00:00
Chris Lattner
f149ab5527 make Identifiers default to be quoted in diagnostic output.
Swift SVN r761
2011-10-19 01:07:31 +00:00
Chris Lattner
ff9d19afbb switch another diagnostic off deprecated calls.
Swift SVN r760
2011-10-19 01:04:18 +00:00
Chris Lattner
fcc547d000 switch parseIdentifier and all its uses to the new diagnostics machinery.
Swift SVN r759
2011-10-19 00:57:50 +00:00
Chris Lattner
3bc1db5776 add convenience support in diagnostics for identifiers. This is a layering violation, to be resolved later.
Swift SVN r758
2011-10-19 00:46:48 +00:00
Chris Lattner
a7c7d64fa0 Switch swift to use SourceLoc instead of SMLoc.
Also use the new getAdvancedLoc() method instead of hacking
on SMLoc directly.

Also fix the warning/note/error methods to forward through ASTContext
instead of being replicated everywhere.



Swift SVN r750
2011-10-18 01:22:29 +00:00
Chris Lattner
3ec9a9720a Add datatypes for swift to represent source locations and ranges, which are
distinct from the SMXXX types.  This is important because SMRange and
SourceRange have subtly different semantics, and is also nice to isolate
SMLoc from swift.


Swift SVN r749
2011-10-18 01:21:29 +00:00
Chris Lattner
44cc26c814 switch to LLVM umbrella header to get stringref.
Swift SVN r746
2011-10-18 00:18:15 +00:00
Doug Gregor
f97641d84c Add support for %select{option1|option2}idx to the diagnostic formatter, and use it in the parser
Swift SVN r739
2011-09-27 00:56:09 +00:00
Doug Gregor
a60a77bb8e C99 variadic macros suck. Use template metaprogramming tricks so we
aren't forced to rely on extensions.


Swift SVN r738
2011-09-27 00:25:56 +00:00
Doug Gregor
c0d0149401 Don't rely on silly GNU extensions. __VA_ARGS__ works fine the way we're using it
Swift SVN r736
2011-09-27 00:02:22 +00:00
Doug Gregor
d7a47dd8bf Don't build zero-length arrays
Swift SVN r735
2011-09-26 23:59:08 +00:00
Doug Gregor
3d15bf3d55 Introduce a diagnostic-formatting engine and port most of the parser's
diagnostics over to it.

There are a few differences between this diagnostic engine and Clang's
engine:
  - Diagnostics are specified by a .def file (Diagnostics.def), rather
  than via tblgen, which drastically simplifies the build and makes
  code completion work when you add a new diagnostic.
  - Calls to the "diagnose()" method are safely typed based on the
  argument types specified in the .def file, so it's harder to write a
  diagnostic whose expected arguments (in the string) and whose actual
  arguments (in the code) don't match.
  - It uses variadic templates, so it hangs with the cool kids.



Swift SVN r734
2011-09-26 23:46:28 +00:00