Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 1 | //===---------------------------------------------------------------------===// |
| 2 | // Minor random things that can be improved |
| 3 | //===---------------------------------------------------------------------===// |
| 4 | |
| 5 | |
Chris Lattner | cd09847 | 2007-10-10 18:08:07 +0000 | [diff] [blame] | 6 | Warn about "X && 0x1000" saying that the user may mean "X & 0x1000". |
| 7 | Probably only want to do this for hex immediates. Likewise for ||. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 8 | |
| 9 | //===---------------------------------------------------------------------===// |
| 10 | |
| 11 | Lexer-related diagnostics should point to the problematic character, not the |
| 12 | start of the token. For example: |
| 13 | |
| 14 | int y = 0000\ |
| 15 | 00080; |
| 16 | |
| 17 | diag.c:4:9: error: invalid digit '8' in octal constant |
| 18 | int y = 0000\ |
| 19 | ^ |
| 20 | |
| 21 | should be: |
| 22 | |
| 23 | diag.c:4:9: error: invalid digit '8' in octal constant |
| 24 | 00080; |
| 25 | ^ |
| 26 | |
Chris Lattner | 136f93a | 2007-07-16 06:55:01 +0000 | [diff] [blame] | 27 | This specific diagnostic is implemented, but others should be updated. |
| 28 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 29 | //===---------------------------------------------------------------------===// |
| 30 | |
Ted Kremenek | dbff47f | 2007-10-10 18:52:22 +0000 | [diff] [blame^] | 31 | C++ (checker): For iterators, warn of the use of "iterator++" instead |
| 32 | of "++iterator" when when the value returned by operator++(int) is |
| 33 | ignored. |