Home | History | Annotate | Download | only in tools
      1 #!/bin/bash
      2 #
      3 # Copyright 2018 Google Inc. All rights reserved.
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 
      7 set -e
      8 
      9 args=""
     10 src=""
     11 
     12 while [ "$1" ]; do
     13     arg=$1
     14 
     15     args="$args $1"
     16     shift
     17 
     18     if [ "$arg" == "-c" ]; then
     19         src=$1
     20 
     21         args="$args $1"
     22         shift
     23     fi
     24 done
     25 
     26 if [ "$src" ]; then
     27     clang-tidy -quiet -header-filter='.*' -warnings-as-errors='*' $src -- $args
     28 fi
     29 exec clang++ $args
     30 
     31