diff --git a/autoload/ale/c.vim b/autoload/ale/c.vim index be54cff1..aefe1fea 100644 --- a/autoload/ale/c.vim +++ b/autoload/ale/c.vim @@ -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 diff --git a/test/test_c_flag_parsing.vader b/test/test_c_flag_parsing.vader index dff19aa3..5f52264e 100644 --- a/test/test_c_flag_parsing.vader +++ b/test/test_c_flag_parsing.vader @@ -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):