beluga
beluga copied to clipboard
adopt clang's diagnostics to beluga
- [ ] inconsistent
printf
arguments - [x] range highlight
- ~~"fix it" - correct common mistakes~~
- [x] display lines before and after macro expansion (#3)
- [x] missing terminating semicolon should be diagnosed at the end of line rather than at the start of next line (#34)
- [ ] warn explicit out-of-bound;
int a[100]; return a[100];
- [ ] warn
memset(p, 0, sizeof(p))
- [x] warn using bit ops in comparison without parentheses (#51)
- [x] warn mixing
&&
and||
without parentheses (#49) - [x] warn
if (a = b)
but notif ((a = b))
(#50) - [x] warn
42 + b? x: y
without parentheses (#53; decided not to implement) - [x] warn empty body of
if
(#47) - [x] diagnose
foo_t P = 42;
as unknown type (#54) - [x] better diagnostics for
(undecled_id)
taking it as cast (#55)
Need to consider issuing a warning for 42 + b? x: y
or b? x: y + 42
is really worthwhile.
Decided not to support the "fix it" feature.