Fix #3200 - Do not use -fstack-usage from parsed flags

This commit is contained in:
w0rp 2020-08-19 01:04:08 +01:00
parent 794224aafa
commit 361027eac6
No known key found for this signature in database
GPG key ID: 0FC1ECAA8C81CD83
2 changed files with 2 additions and 2 deletions

View file

@ -159,7 +159,7 @@ function! ale#c#ParseCFlags(path_prefix, cflag_line) abort
elseif (stridx(l:option, '-W') == 0 && stridx(l:option, '-Wa,') != 0 && stridx(l:option, '-Wl,') != 0 && stridx(l:option, '-Wp,') != 0)
\ || l:option is# '-w' || stridx(l:option, '-pedantic') == 0
\ || l:option is# '-ansi' || stridx(l:option, '-std=') == 0
\ || (stridx(l:option, '-f') == 0 && stridx(l:option, '-fdump') != 0 && stridx(l:option, '-fdiagnostics') != 0 && stridx(l:option, '-fno-show-column') != 0)
\ || stridx(l:option, '-f') == 0 && l:option !~# '\v^-f(dump|diagnostics|no-show-column|stack-usage)'
\ || stridx(l:option, '-O') == 0
\ || l:option is# '-C' || l:option is# '-CC' || l:option is# '-trigraphs'
\ || stridx(l:option, '-nostdinc') == 0 || stridx(l:option, '-iplugindir=') == 0

View file

@ -364,7 +364,7 @@ Execute(CFlags we dont want to pass):
\ ale#c#ParseCFlags(
\ ale#path#Simplify(g:dir. '/test_c_projects/makefile_project'),
\ 'gcc -Wl,option -Wa,option -Wp,option filename.c somelib.a '
\ . '-fdump-file=name -fdiagnostics-arg -fno-show-column'
\ . '-fdump-file=name -fdiagnostics-arg -fno-show-column -fstack-usage'
\ )
Execute(Expanding @file in CFlags):