summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-04-29 20:00:29 +0100
committerw0rp <devw0rp@gmail.com>2017-04-29 20:00:42 +0100
commit2c7d14809d5e143af89317461daadd12408bfbd5 (patch)
tree5731835343d05eb8ddd539c4f41aae1ac21a5f0b /autoload
parentdfb10f1db2d2aaacf6c1bcc6fe69223398a46420 (diff)
downloadale-2c7d14809d5e143af89317461daadd12408bfbd5.zip
Set GCC flags appropriately for older versions
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/gcc.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/autoload/ale/handlers/gcc.vim b/autoload/ale/handlers/gcc.vim
index fe941734..75964f72 100644
--- a/autoload/ale/handlers/gcc.vim
+++ b/autoload/ale/handlers/gcc.vim
@@ -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