blob: addbee39aced1236dba6978170cbd95bf6dc34c8 [file] [log] [blame]
Mike Klein16885072018-12-11 09:54:31 -05001#!/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
7set -e
8
9args=""
10src=""
11
12while [ "$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
24done
25
26if [ "$src" ]; then
Mike Kleinad648732018-12-12 09:40:40 -050027 clang-tidy -quiet -header-filter='.*' -warnings-as-errors='*' $src -- $args
Mike Klein16885072018-12-11 09:54:31 -050028fi
29exec clang++ $args
30