Commit Graph

4104 Commits

Author SHA1 Message Date
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