Sha256: 8486dd1e7334cbcac5730275636750e43435b12c5d37591d0ff4984d100755bc

Contents?: true

Size: 1.31 KB

Versions: 22

Compression:

Stored size: 1.31 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

22 entries across 22 versions & 1 rubygems

Version Path
bake-toolkit-2.20.4 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.20.3 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.20.2 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.20.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.19.2 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.19.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.19.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.18.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.17.4 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.17.3 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.17.2 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.17.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.16.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.15.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.14.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.13.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.13.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.12.2 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.12.1 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt
bake-toolkit-2.12.0 documentation/_build/html/_sources/tips_and_tricks/the_clang.txt