[PATCH] D40715: [analyser] different.LabelInsideSwitch checker implementation

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 11 13:44:14 PST 2017


dcoughlin added a comment.

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?
- If users do actually want to use labels in their switch statements, how should they suppress the diagnostics from the checker?
- 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.)


Repository:
  rC Clang

https://reviews.llvm.org/D40715





More information about the cfe-commits mailing list