blob: e18fd5a812b9abb6c312666fb7ec7e2516792143 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001//===---------------------------------------------------------------------===//
2// Minor random things that can be improved
3//===---------------------------------------------------------------------===//
4
5
Chris Lattnercd098472007-10-10 18:08:07 +00006Warn about "X && 0x1000" saying that the user may mean "X & 0x1000".
Chris Lattner507cc6c2007-10-11 16:06:02 +00007We should do this for any immediate except zero, so long as it doesn't come
8from a macro expansion. Likewise for ||.
Reid Spencer5f016e22007-07-11 17:01:13 +00009
10//===---------------------------------------------------------------------===//
11
12Lexer-related diagnostics should point to the problematic character, not the
13start of the token. For example:
14
15int y = 0000\
1600080;
17
18diag.c:4:9: error: invalid digit '8' in octal constant
19int y = 0000\
20 ^
21
22should be:
23
24diag.c:4:9: error: invalid digit '8' in octal constant
2500080;
26 ^
27
Chris Lattner136f93a2007-07-16 06:55:01 +000028This specific diagnostic is implemented, but others should be updated.
29
Reid Spencer5f016e22007-07-11 17:01:13 +000030//===---------------------------------------------------------------------===//
31
Ted Kremenekdbff47f2007-10-10 18:52:22 +000032C++ (checker): For iterators, warn of the use of "iterator++" instead
33 of "++iterator" when when the value returned by operator++(int) is
34 ignored.