From f29e3ce8d51498799f69dde1e22db4001eb642fe Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 27 Jan 2014 09:37:22 +0100 Subject: doc/developer: explain clang static analyzer --- doc/developer.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'doc/developer.xml') diff --git a/doc/developer.xml b/doc/developer.xml index 18d6eb724..22a2b9fed 100644 --- a/doc/developer.xml +++ b/doc/developer.xml @@ -158,4 +158,41 @@ foo(const char *abc, int xyz) mpd-devel@musicpd.org + + + Development Tools + +
+ Clang Static Analyzer + + + The clang static + analyzer is a tool that helps find bugs. To run it on + the MPD code base, install LLVM and clang. Configure MPD to + use clang: + + + ./configure --enable-debug CXX=clang++ CC=clang ... + + + It is recommended to use , + because the analyzer takes advantage of + assert() calls, which are only enabled in + the debug build. + + + + Now run the analyzer: + + + scan-build --use-c++=clang++ --use-cc=clang make + + + The options and + are necessary because it invokes + cc for actually compiling the sources by + default. That breaks, because MPD requires a C99 compiler. + +
+
-- cgit v1.2.3