Set GCC flags appropriately for older versions

This commit is contained in:
w0rp
2017-04-29 20:00:29 +01:00
parent dfb10f1db2
commit 2c7d14809d
3 changed files with 34 additions and 10 deletions

View File

@@ -26,6 +26,18 @@ function! s:RemoveUnicodeQuotes(text) abort
return l:text
endfunction
function! ale#handlers#gcc#ParseGCCVersion(lines) abort
for l:line in a:lines
let l:match = matchstr(l:line, '\d\.\d\.\d')
if !empty(l:match)
return ale#semver#Parse(l:match)
endif
endfor
return []
endfunction
function! ale#handlers#gcc#HandleGCCFormat(buffer, lines) abort
let l:include_pattern = '\v^(In file included | *)from ([^:]*):(\d+)'
let l:include_lnum = 0