Merge pull request #2272 from Rahlir/fix-c-compilecommand
Fix error when parsing compile_commands for c languages
This commit is contained in:
commit
3ba7d02708
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ function! s:GetLookupFromCompileCommandsFile(compile_commands_file) abort
|
||||||
let l:file_lookup[l:basename] = get(l:file_lookup, l:basename, []) + [l:entry]
|
let l:file_lookup[l:basename] = get(l:file_lookup, l:basename, []) + [l:entry]
|
||||||
|
|
||||||
let l:dirbasename = tolower(fnamemodify(l:entry.directory, ':p:h:t'))
|
let l:dirbasename = tolower(fnamemodify(l:entry.directory, ':p:h:t'))
|
||||||
let l:dir_lookup[l:dirbasename] = get(l:dir_lookup, l:basename, []) + [l:entry]
|
let l:dir_lookup[l:dirbasename] = get(l:dir_lookup, l:dirbasename, []) + [l:entry]
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
if !empty(l:file_lookup) && !empty(l:dir_lookup)
|
if !empty(l:file_lookup) && !empty(l:dir_lookup)
|
||||||
|
|
Reference in a new issue