llvm-project/clang/test
Chris Lattner bb1b44f004 Make octal constant lexing use AdvanceToTokenCharacter to give more
accurate diagnostics.  For test/Lexer/comments.c we now emit:

int x = 000000080;  /* expected-error {{invalid digit}} */
               ^
constants.c:7:4: error: invalid digit '8' in octal constant
00080;             /* expected-error {{invalid digit}} */
   ^


The last line is due to an escaped newline.  The full line looks like:

int y = 0000\
00080;             /* expected-error {{invalid digit}} */


Previously, we emitted:
constants.c:4:9: error: invalid digit '8' in octal constant
int x = 000000080;  /* expected-error {{invalid digit}} */
        ^
constants.c:6:9: error: invalid digit '8' in octal constant
int y = 0000\
        ^

which isn't too bad, but the new way is better for the user,
regardless of whether there is an escaped newline or not.

All the other lexer-related diagnostics should switch over 
to using AdvanceToTokenCharacter where appropriate.  Help
wanted :).

This implements test/Lexer/constants.c.

llvm-svn: 39906
2007-07-16 06:55:01 +00:00
..
CodeGen add FIXME and un-XFAIL test 2007-07-14 20:05:18 +00:00
Lexer Make octal constant lexing use AdvanceToTokenCharacter to give more 2007-07-16 06:55:01 +00:00
Parser Improve char literal pretty printing, patch by Keith Bauer! 2007-07-13 23:58:20 +00:00
Preprocessor Warn when performing 'usual' conversions that require a sign change. This 2007-04-11 04:14:45 +00:00
Sema Remove an extraneous QualType from CastExpr, it's type is always 2007-07-15 23:54:50 +00:00
Makefile add required directories to the path automatically, so the user doesn't need to worry about it. 2007-07-16 04:35:52 +00:00
TestRunner.sh Make make check work again. 2007-06-08 17:57:13 +00:00