haowei created this revision. 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 https://reviews.llvm.org/D33263 Files: tools/scan-build/libexec/ccc-analyzer Index: tools/scan-build/libexec/ccc-analyzer =================================================================== --- tools/scan-build/libexec/ccc-analyzer +++ tools/scan-build/libexec/ccc-analyzer @@ -385,7 +385,8 @@ '-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 = (
Index: tools/scan-build/libexec/ccc-analyzer =================================================================== --- tools/scan-build/libexec/ccc-analyzer +++ tools/scan-build/libexec/ccc-analyzer @@ -385,7 +385,8 @@ '-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 = (
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits