2021-10-18 14:01:51 +00:00
|
|
|
#!/bin/sh -eux
|
2021-04-14 02:01:54 +00:00
|
|
|
|
|
|
|
tmp_cpp=`mktemp -t XXXXX.cpp`
|
|
|
|
tmp_dir=`mktemp -d`
|
|
|
|
echo 'int main(int argc, char*argv[]) { while(argc--) new int(); return 0; }' > $tmp_cpp
|
|
|
|
scan-build -o $tmp_dir clang++ -c $tmp_cpp -o /dev/null
|
|
|
|
(scan-view --no-browser $tmp_dir/* & WPID=$! && sleep 10s && kill $WPID)
|
|
|
|
|