beluga icon indicating copy to clipboard operation
beluga copied to clipboard

adopt clang's diagnostics to beluga

Open mycoboco opened this issue 9 years ago • 2 comments

  • [ ] 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 not if ((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)

mycoboco avatar Dec 14 '15 12:12 mycoboco

Need to consider issuing a warning for 42 + b? x: y or b? x: y + 42 is really worthwhile.

mycoboco avatar Mar 30 '16 14:03 mycoboco

Decided not to support the "fix it" feature.

mycoboco avatar Jan 07 '17 14:01 mycoboco