LLVM/Clang Static Analyzer

Instructions (Linux)

Copy llvm/Debug/bin/clang-cc and the following files to the RB build diretory. "llvm/tools/clang/utils": ccc-analyzer, scan-build, scanview.css, sortable.js

Because Clang doesn't seem to handle ARM ASM, uncomment all ASM parts in: firmware/target/arm/system-arm.h firmware/target/arm/system-target.h There are many more places with ASM which stop the parser, but these 2 files get included very often..

Go to the build directory.

Add the compiler to the path: "export PATH=$PATH:/usr/local/arm-elf/bin/"

Configure (select sansa e200): "../tools/configure"

Make the dependencies (because Clang can't do that): "make dep"

Comment out "export CC=.." in the Makefile (build dir)

Add the following directory to the "C include path" (for Clang) "export C_INCLUDE_PATH=/usr/local/arm-elf/lib/gcc/arm-elf/4.0.3/include/"