Skip to content
  1. Jan 04, 2011
  2. Dec 10, 2010
  3. Dec 23, 2009
  4. Dec 07, 2009
  5. Nov 10, 2009
  6. Apr 02, 2009
  7. Feb 04, 2009
  8. Nov 17, 2008
  9. Jul 13, 2008
  10. Mar 18, 2008
  11. Oct 11, 2007
  12. Oct 10, 2007
  13. Jul 16, 2007
    • Chris Lattner's avatar
      Make octal constant lexing use AdvanceToTokenCharacter to give more · bb1b44f0
      Chris Lattner authored
      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
      bb1b44f0
  14. Jun 08, 2007
Loading