hanchenye-llvm-project/clang/include/clang/Lex
Chris Lattner 3565c8e343 Neil pointed out that clang doesn't generate ranges from diagnostics
related to pp-expressions.  Doing so is pretty simple and this
patch implements it, yielding nice diagnostics like:

t.c:2:7: error: division by zero in preprocessor expression
#if 1 / (0 + 0)
    ~ ^ ~~~~~~~
t.c:5:14: error: expected ')' in preprocessor expression
#if (412 + 42
     ~~~~~~~~^
t.c:5:5: error: to match this '('
#if (412 + 42
    ^
t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574
#if (-42 + 0U) / -2
     ~~~ ^ ~~
t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614
#if (-42 + 0U) / -2
    ~~~~~~~~~~ ^ ~~
5 diagnostics generated.

llvm-svn: 50638
2008-05-05 06:45:50 +00:00
..
DirectoryLookup.h Two more Windows-related fixes: 2008-02-24 03:55:14 +00:00
HeaderMap.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
HeaderSearch.h Two more Windows-related fixes: 2008-02-24 03:55:14 +00:00
Lexer.h reenable highlighting of (the first line of) comments 2008-04-16 20:54:51 +00:00
LiteralSupport.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
MacroInfo.h Remove the first layer of support for "portability" warnings. This is 2008-03-05 01:18:20 +00:00
MultipleIncludeOpt.h Fix PR2086. 2008-02-25 19:03:15 +00:00
PPCallbacks.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
Pragma.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
Preprocessor.h Neil pointed out that clang doesn't generate ranges from diagnostics 2008-05-05 06:45:50 +00:00
ScratchBuffer.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
Token.h Change encoding of TokenKind in IdentifierTable to be of type "unsigned" 2008-02-23 01:05:54 +00:00
TokenLexer.h implement simple support for arbitrary token lookahead. Change the 2008-03-10 06:06:04 +00:00