type: improve handling of type promotion on binary operations
[smatch.git] / smatch_scripts / build_kernel_data.sh
blobba0ec0de26b7185def4795d5c16db287a3735c11
1 #!/bin/bash
3 PROJECT=kernel
5 function usage {
6 echo
7 echo "Usage: $0"
8 echo "Updates the smatch_data/ directory and builds the smatch database"
9 echo
10 exit 1
13 if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
14 usage;
17 SCRIPT_DIR=$(dirname $0)
18 if [ -e $SCRIPT_DIR/../smatch ] ; then
19 CMD=$SCRIPT_DIR/../smatch
20 DATA_DIR=$SCRIPT_DIR/../smatch_data
21 else
22 echo "This script should be run from the smatch_scripts/ directory."
23 exit 1
26 $SCRIPT_DIR/test_kernel.sh --call-tree --info --param-mapper --spammy --data=$DATA_DIR
28 for i in $SCRIPT_DIR/gen_* ; do
29 $i warns.txt
30 done
32 mv ${PROJECT}.* $DATA_DIR
33 mv no_return_funcs $DATA_DIR/${PROJECT}.no_return_funcs
35 $SCRIPT_DIR/db/create_db.sh -p=kernel warns.txt