Sha256: 7b6497aa30c05ce6dbbaf48c88e5d79745e0fca4879d684cc2b01df7d2eb34c0

Contents?: true

Size: 1.26 KB

Versions: 29

Compression:

Stored size: 1.26 KB

Contents

Clang Analyze
*************

bake can be easily used to analyze source files with Clang. It works simliar to regular compiling, but instead of
invoking the compiler, the Clang Analyzer will be called.

Imagine you have a workspace with the following "main" project:

    .. code-block:: console

		Project {
          ...
          ExecutableConfig Debug {
            ...
            DefaultToolchain GCC
          }
        }

Either edit this Project.meta or create a new "analyze" project:

    .. code-block:: console

        Project {
          CustomConfig Analyze {
            Dependency main, config: Debug
            DefaultToolchain CLANG_ANALYZE {
              Compiler CPP {
                Flags "-analyzer-checker=deadcode,security,alpha,unix,cplusplus"
              }
              Compiler C {
                Flags "-analyzer-checker=deadcode,security,alpha,unix"
              }
            }
          }
        }

As you can see the DefaultToolchain GCC is replaced with CLANG_ANALYZE. Call bake like this:

    .. code-block:: console

        bake Analyze -f .

"-f" means that only the compilation step will take place. The "." means files with a "." in the name will be compiled (= all files). If you want to analyze only C++ files, you can write "-f .cpp"

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
bake-toolkit-2.29.4 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.29.3 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.29.2 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.29.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.28.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.28.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.27.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.26.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.26.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.25.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.25.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.24.6 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.24.5 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.24.4 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.24.3 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.24.2 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.24.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.24.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.23.12 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.23.8 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt