From 5326bb4a7763515eb593bfc64c9207e984f07696 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 26 May 2017 19:25:32 +0000 Subject: [PATCH] [scan-build] Patch to scan-build tool to support "--target=" flag The scan-build script provided by clang can be used to detect defects in code in the compile time. However, we discovered that the "--target=" flag in clang is not properly handled by this script, which results in failures when analyzing projects that have used this flag in their makefile. This single line of change allows scan-build script to properly handle the "--target=" flag. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D33263 llvm-svn: 304025 --- clang/tools/scan-build/libexec/ccc-analyzer | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/tools/scan-build/libexec/ccc-analyzer b/clang/tools/scan-build/libexec/ccc-analyzer index bfda1d3..b0ec7e7 100755 --- a/clang/tools/scan-build/libexec/ccc-analyzer +++ b/clang/tools/scan-build/libexec/ccc-analyzer @@ -385,7 +385,8 @@ my %CompilerLinkerOptionMap = ( '-target' => 1, '-v' => 0, '-mmacosx-version-min' => 0, # This is really a 1 argument, but always has '=' - '-miphoneos-version-min' => 0 # This is really a 1 argument, but always has '=' + '-miphoneos-version-min' => 0, # This is really a 1 argument, but always has '=' + '--target' => 0 ); my %IgnoredOptionMap = ( -- 2.7.4