diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 18:34:31 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 18:34:31 +0000 |
commit | 0d17737137b14ff25c26ba5984c099165bffa813 (patch) | |
tree | a17c06eac1e24c28c422106393b1a33df824bd0a /tools/clang_check/cxx_wrapper.sh | |
parent | 906690b746ff0bbc3eedc839fc7ae03936f3dc67 (diff) | |
download | chromium_src-0d17737137b14ff25c26ba5984c099165bffa813.zip chromium_src-0d17737137b14ff25c26ba5984c099165bffa813.tar.gz chromium_src-0d17737137b14ff25c26ba5984c099165bffa813.tar.bz2 |
Add temporary hacks for clang plugins.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5615002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang_check/cxx_wrapper.sh')
-rwxr-xr-x | tools/clang_check/cxx_wrapper.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/clang_check/cxx_wrapper.sh b/tools/clang_check/cxx_wrapper.sh new file mode 100755 index 0000000..9f0ff0f --- /dev/null +++ b/tools/clang_check/cxx_wrapper.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# Strip out any parameters that will make clang do anything other than syntax +# checking. +TARGETOBJ=`echo $@ | sed -e 's/.*-o \(.*\.o\).*/\1/;'` + +ADJUSTED=`echo "$@" | sed -e 's/ -c / /g;' |\ + sed -e 's/ -O0 / /g;' |\ + sed -e 's/ -g / /g;' |\ + sed -e 's/Google Inc/GoogleInc/g;' |\ + sed -e 's/ -Wunused-value / /g;' |\ + sed -e 's/ -Wswitch-enum / /g;' |\ + sed -e 's/ -pipe / /g;' |\ + sed -e 's/ -o.*\.o / /g;'` + +clang++ -fsyntax-only $ADJUSTED && touch "$TARGETOBJ" |