blob: 111f747275d96ecea076a6e84f69837f834c508c [file] [log] [blame]
Chris Lattner4b009652007-07-25 00:24:17 +00001//===---------------------------------------------------------------------===//
2// Minor random things that can be improved
3//===---------------------------------------------------------------------===//
Steve Naroff7cabb922008-03-18 20:05:01 +00004
Chris Lattner4b009652007-07-25 00:24:17 +00005
Chris Lattnerd8c4f142007-10-10 18:08:07 +00006Warn about "X && 0x1000" saying that the user may mean "X & 0x1000".
Chris Lattner1b188fd2007-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 ||.
Chris Lattner4b009652007-07-25 00:24:17 +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
28This specific diagnostic is implemented, but others should be updated.
29
30//===---------------------------------------------------------------------===//
31
Ted Kremenek18b4ced2007-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.