Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b460584 authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Gerrit Code Review
Browse files

Merge "Use new clang scan-build script."

parents 4859b22e 42d5c292
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -644,11 +644,18 @@ function getdriver()
    local T="$1"
    test "$WITH_STATIC_ANALYZER" = "0" && unset WITH_STATIC_ANALYZER
    if [ -n "$WITH_STATIC_ANALYZER" ]; then
        # Use scan-build to collect all static analyzer reports into directory
        # /tmp/scan-build-yyyy-mm-dd-hhmmss-*
        # The clang compiler passed by --use-analyzer here is not important.
        # build/core/binary.mk will set CLANG_CXX and CLANG before calling
        # c++-analyzer and ccc-analyzer.
        local CLANG_VERSION=$(get_build_var LLVM_PREBUILTS_VERSION)
        local BUILD_OS=$(get_build_var BUILD_OS)
        local CLANG_DIR="$T/prebuilts/clang/host/${BUILD_OS}-x86/${CLANG_VERSION}"
        echo "\
$T/prebuilts/misc/linux-x86/analyzer/tools/scan-build/scan-build \
--use-analyzer $T/prebuilts/misc/linux-x86/analyzer/bin/analyzer \
--status-bugs \
--top=$T"
${CLANG_DIR}/tools/scan-build/bin/scan-build \
--use-analyzer ${CLANG_DIR}/bin/clang \
--status-bugs"
    fi
}