r304025 - [scan-build] Patch to scan-build tool to support "--target=<value>" flag

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Fri May 26 12:25:33 PDT 2017


Author: phosek
Date: Fri May 26 14:25:32 2017
New Revision: 304025

URL: http://llvm.org/viewvc/llvm-project?rev=304025&view=rev
Log:
[scan-build] Patch to scan-build tool to support "--target=<value>" 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=<value>" 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=<value>" flag.

Patch by Haowei Wu

Differential Revision: https://reviews.llvm.org/D33263

Modified:
    cfe/trunk/tools/scan-build/libexec/ccc-analyzer

Modified: cfe/trunk/tools/scan-build/libexec/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/libexec/ccc-analyzer?rev=304025&r1=304024&r2=304025&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/libexec/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/libexec/ccc-analyzer Fri May 26 14:25:32 2017
@@ -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 = (




More information about the cfe-commits mailing list