• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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" ] && [[ "$src" != *"third_party"* ]]; then
27    clang-tidy -quiet -header-filter='.*' -warnings-as-errors='*' $src -- $args
28fi
29exec clang++ $args
30
31