diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-17 01:18:04 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-22 02:34:30 +0000 |
commit | f627a26a7b1c3619ba66f84b87092ff8ba7a95b6 (patch) | |
tree | c72c950fab473dc9bec4b5329d251b790e55443d /other/analysis/run-gcc | |
parent | 7245ac11ef9be2420c8356c12acc79f93ea211bb (diff) |
Run Clang global static analysis on Travis.
This uses a single .cc file containing almost all the code in the
repository to perform whole program analysis.
Diffstat (limited to 'other/analysis/run-gcc')
-rwxr-xr-x | other/analysis/run-gcc | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/other/analysis/run-gcc b/other/analysis/run-gcc index ffd42f4e..3ea32782 100755 --- a/other/analysis/run-gcc +++ b/other/analysis/run-gcc | |||
@@ -2,12 +2,14 @@ | |||
2 | 2 | ||
3 | . other/analysis/gen-file.sh | 3 | . other/analysis/gen-file.sh |
4 | 4 | ||
5 | put auto_tests/lan_discovery_test.c | 5 | echo "Running GCC" |
6 | |||
7 | # TODO(iphydf): Get rid of all VLAs, then enable -fstack-protector -Wstack-protector | 6 | # TODO(iphydf): Get rid of all VLAs, then enable -fstack-protector -Wstack-protector |
8 | gcc -O3 -c -o /dev/null test.c $CPPFLAGS \ | 7 | g++ -O3 -o /dev/null amalgamation.cc \ |
9 | -std=c99 \ | 8 | $CPPFLAGS \ |
9 | $LDFLAGS \ | ||
10 | -std=c++11 \ | ||
10 | -pedantic \ | 11 | -pedantic \ |
12 | -fdiagnostics-color=always \ | ||
11 | -Wall \ | 13 | -Wall \ |
12 | -Wextra \ | 14 | -Wextra \ |
13 | -Wno-aggregate-return \ | 15 | -Wno-aggregate-return \ |
@@ -22,18 +24,9 @@ gcc -O3 -c -o /dev/null test.c $CPPFLAGS \ | |||
22 | -Wno-unused-parameter \ | 24 | -Wno-unused-parameter \ |
23 | -Wstrict-aliasing=0 \ | 25 | -Wstrict-aliasing=0 \ |
24 | -Wstrict-overflow=1 \ | 26 | -Wstrict-overflow=1 \ |
25 | \ | 27 | \ |
26 | -Wbad-function-cast \ | ||
27 | -Wmissing-declarations \ | 28 | -Wmissing-declarations \ |
28 | -Wmissing-parameter-type \ | ||
29 | -Wmissing-prototypes \ | ||
30 | -Wnested-externs \ | ||
31 | -Wold-style-declaration \ | ||
32 | -Wold-style-definition \ | ||
33 | -Wstrict-prototypes \ | ||
34 | -Wbool-compare \ | 29 | -Wbool-compare \ |
35 | -Wc99-c11-compat \ | ||
36 | -Wc++-compat \ | ||
37 | -Wcast-align \ | 30 | -Wcast-align \ |
38 | -Wcast-qual \ | 31 | -Wcast-qual \ |
39 | -Wchar-subscripts \ | 32 | -Wchar-subscripts \ |
@@ -45,10 +38,8 @@ gcc -O3 -c -o /dev/null test.c $CPPFLAGS \ | |||
45 | -Wformat=2 \ | 38 | -Wformat=2 \ |
46 | -Wframe-address \ | 39 | -Wframe-address \ |
47 | -Wframe-larger-than=133168 \ | 40 | -Wframe-larger-than=133168 \ |
48 | -Wjump-misses-init \ | ||
49 | -Wignored-qualifiers \ | 41 | -Wignored-qualifiers \ |
50 | -Wignored-attributes \ | 42 | -Wignored-attributes \ |
51 | -Wincompatible-pointer-types \ | ||
52 | -Winit-self \ | 43 | -Winit-self \ |
53 | -Winline \ | 44 | -Winline \ |
54 | -Wlarger-than=133120 \ | 45 | -Wlarger-than=133120 \ |