2007-06-09 01:15:31 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Minor random things that can be improved
|
|
|
|
//===---------------------------------------------------------------------===//
|
2008-03-19 04:05:01 +08:00
|
|
|
|
2007-06-09 01:15:31 +08:00
|
|
|
|
2007-10-11 02:08:07 +08:00
|
|
|
Warn about "X && 0x1000" saying that the user may mean "X & 0x1000".
|
2007-10-12 00:06:02 +08:00
|
|
|
We should do this for any immediate except zero, so long as it doesn't come
|
|
|
|
from a macro expansion. Likewise for ||.
|
2007-06-09 01:15:31 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
Lexer-related diagnostics should point to the problematic character, not the
|
|
|
|
start of the token. For example:
|
|
|
|
|
|
|
|
int y = 0000\
|
|
|
|
00080;
|
|
|
|
|
|
|
|
diag.c:4:9: error: invalid digit '8' in octal constant
|
|
|
|
int y = 0000\
|
|
|
|
^
|
|
|
|
|
|
|
|
should be:
|
|
|
|
|
|
|
|
diag.c:4:9: error: invalid digit '8' in octal constant
|
|
|
|
00080;
|
|
|
|
^
|
|
|
|
|
2007-07-16 14:55:01 +08:00
|
|
|
This specific diagnostic is implemented, but others should be updated.
|
|
|
|
|
2007-06-09 01:15:31 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2007-10-11 02:52:22 +08:00
|
|
|
C++ (checker): For iterators, warn of the use of "iterator++" instead
|
|
|
|
of "++iterator" when when the value returned by operator++(int) is
|
|
|
|
ignored.
|