Page MenuHomePhabricator

alexey.knyshev (Alexey Knyshev)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 1 2017, 4:00 AM (76 w, 5 d)

Recent Activity

Dec 16 2017

alexey.knyshev edited reviewers for D41077: [analyser] different.CallArgsOrder checker implementation, added: dergachev.a, zaks.anna, dcoughlin; removed: anna.
Dec 16 2017, 5:53 AM · Restricted Project

Dec 15 2017

alexey.knyshev created D41308: [analyser] different.BitwiseOpBoolArg checker implementation.
Dec 15 2017, 1:24 PM

Dec 11 2017

alexey.knyshev added a comment to D40715: [analyser] different.LabelInsideSwitch checker implementation.

Thanks for looking into this!

This checker is in the 'core' package, which means (when moved out of alpha) it will be enabled by default.

  • Do you think that this checker should be enabled by default for all users of the analyzer?

I think so

  • If users do actually want to use labels in their switch statements, how should they suppress the diagnostics from the checker?

Good point, is there recommended way to implement options for checker? Where can I find any reference example?

  • What is the benefit of adding this check in the static analyzer vs. in clang-tidy?

(My own sense is that the check for labels that are close to "default" could be on by default but that warning on *any* label inside a switch is more stylistic. I think users should have to opt in to that check.)

It makes sense. So, I can make generic case when we found any label in swichStmt opt-in (default=off) and left cases when it looks like typo in 'case' or 'default' keywords enabled by default.
Thanks!

Dec 11 2017, 11:37 PM · Restricted Project
alexey.knyshev created D41077: [analyser] different.CallArgsOrder checker implementation.
Dec 11 2017, 10:57 AM · Restricted Project
alexey.knyshev added inline comments to D40715: [analyser] different.LabelInsideSwitch checker implementation.
Dec 11 2017, 2:30 AM · Restricted Project

Dec 10 2017

alexey.knyshev added inline comments to D40715: [analyser] different.LabelInsideSwitch checker implementation.
Dec 10 2017, 10:24 AM · Restricted Project
alexey.knyshev updated the diff for D40715: [analyser] different.LabelInsideSwitch checker implementation.
  1. Now implemented via MatchFinder
  2. Added missing License header
  3. Pass all StringRefs by value
  4. Method names now start from small letter
  5. Using StringRef::edit_distance instead of custom "similarity" metric
  6. Various other formating fixes
Dec 10 2017, 4:33 AM · Restricted Project

Dec 1 2017

alexey.knyshev created D40715: [analyser] different.LabelInsideSwitch checker implementation.
Dec 1 2017, 4:23 AM · Restricted Project