Changes between Initial Version and Version 1 of ClangAnalyzer


Ignore:
Timestamp:
2016-07-21T09:16:48Z (8 years ago)
Author:
Jakub Jermář
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ClangAnalyzer

    v1 v1  
     1= Using clang for static analysis =
     2
     3LLVM/Clang comes with a static analyzer that can be used to generate web-based analysis reports for many bug categories.
     4
     5== Prerequistities ==
     6
     7Make sure the analyzer is installed on your system. On Fedora 24 the package is called clang-analyzer. Also make sure you have web browser installed.
     8
     9== Running the analysis ==
     10
     11Configure HelenOS for e.g. amd64 and in the HelenOS source root directory run the following command:
     12
     13{{{
     14$ scan-build make PROFILE=amd64
     15}}}
     16
     17This should kick off the static analysis process and result in a message like the following:
     18
     19{{{
     20scan-build: 121 bugs found.
     21scan-build: Run 'scan-view /tmp/scan-build-2016-07-18-210821-13060-1' to examine bug reports.
     22}}}
     23
     24== Inspecting the results ==
     25
     26When the analysis run is finished, one can inspect the result by the following command (assuming the output above):
     27
     28{{{
     29$ scan-view /tmp/scan-build-2016-07-18-210821-13060-1
     30Starting scan-view at: http://127.0.0.1:8181
     31  Use Ctrl-C to exit.
     32Created new window in existing browser session.
     33}}}
     34
     35Now you should be able to inspect the results in your web browser:
     36