alexmurray / flycheck-clang-analyzer

Integrate Clang Static Analyzer with flycheck for on-the-fly static analysis in Emacs
35 stars 5 forks source link

Just trying to understand the added value of this package. #5

Closed hisnawi closed 7 years ago

hisnawi commented 7 years ago

Given the following setup, how is this package adding extra value?

  1. llvm/clang installed
  2. irony-mode
  3. flycheck and irony-flycheck.

I can already see programming errors on the fly, so I am not sure how is the clang-analyzer any different?

alexmurray commented 7 years ago

The added value is this adds static analysis via clang - so with irony you get compilation checking, which will catch things like unused variables, or syntactic errors etc.

But with flycheck-clang-analyzer, you get checking for things like memory leaks, and everything else that scan-build provides - ie. higher order issues not covered by a normal compiler - normally you can only run scan-build outside the normal editing workflow - it is a standalone tool with HTML output - but flycheck-clang-analyzer integrates this into Emacs so you get it as you code.

For more info check out https://clang-analyzer.llvm.org/

hisnawi commented 7 years ago

Got it, excellent work!