mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01:00
45245: _gcc: add some clang specific warnings
This commit is contained in:
parent
7542732df6
commit
8500403b66
2 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-01-06 dana <dana@dana.is>
|
||||
|
||||
* Eitan Adler: 45245: Completion/Unix/Command/_gcc: add some
|
||||
clang specific warnings
|
||||
|
||||
2020-01-06 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45231: Completion/Unix/Command/_rsync: When completing remote
|
||||
|
|
|
@ -350,10 +350,12 @@ if [[ "$service" = clang* ]]; then
|
|||
"-nostdinc[Do not search standard system directories or compiler builtin directories for include files]"
|
||||
"-nostdlibinc[Do not search standard system directories for include files]"
|
||||
"-nobuiltininc[Do not search builtin directory for include files]"
|
||||
"--help[Display this information]"
|
||||
)
|
||||
else
|
||||
args+=(
|
||||
'-flto=-[Enable link-time optimization]::jobs:'
|
||||
'*--help=-[Display this information]:class:->help'
|
||||
)
|
||||
fi
|
||||
|
||||
|
@ -427,7 +429,6 @@ args+=(
|
|||
'*-isystem:second include path directory (system):_files -/'
|
||||
'--sysroot=-[Use <directory> as the root directory for headers and libraries]:directory:_files -/'
|
||||
'-pass-exit-codes[Exit with highest error code from a phase]'
|
||||
'*--help=-[Display this information]:class:->help'
|
||||
'--target-help[Display target specific command line options]'
|
||||
'-dumpspecs[Display all of the built in spec strings]'
|
||||
'-dumpversion[Display the version of the compiler]'
|
||||
|
@ -676,7 +677,6 @@ args+=(
|
|||
'-Wunderflow[Warn about underflow of numerical constant expressions]'
|
||||
'-Wuninitialized[Warn about uninitialized automatic variables]'
|
||||
'-Wunknown-pragmas[Warn about unrecognized pragmas]'
|
||||
'-Wunreachable-code[Does nothing. Preserved for backward compatibility]'
|
||||
'-Wunsafe-loop-optimizations[Warn if the loop cannot be optimized due to nontrivial assumptions]'
|
||||
'-Wunsuffixed-float-constants[Warn about unsuffixed float constants]'
|
||||
'-Wunused-but-set-parameter[Warn when a function parameter is only set, otherwise unused]'
|
||||
|
@ -730,6 +730,20 @@ args+=(
|
|||
'-Werror=-[Treat specified warning as error (or all if none specified)]::warning:->werror'
|
||||
'-Wfatal-errors[Exit on the first error occurred]'
|
||||
)
|
||||
# clang specific warnings
|
||||
if [[ "$service" = clang* ]]; then
|
||||
args+=(
|
||||
'-Wunreachable-code[Warn on code that will not be executed]'
|
||||
'-Wunreachable-code-aggressive[Controls -Wunreachable-code, -Wunreachable-code-break, -Wunreachable-code-return]'
|
||||
'-Wunreachable-code-break[Warn when break will never be executed]'
|
||||
'-Wunreachable-code-loop-increment[Warn when loop will be executed only once]'
|
||||
'-Wunreachable-code-return[Warn when return will not be executed]'
|
||||
)
|
||||
else
|
||||
args+=(
|
||||
'-Wunreachable-code[Does nothing. Preserved for backward compatibility]'
|
||||
)
|
||||
fi
|
||||
# optimizers (from --help=optimizers), except for -O
|
||||
args+=(
|
||||
# --help=optimizers,^joined
|
||||
|
|
Loading…
Reference in a new issue