mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
fix: cflags parser: no absolute path for '-include' (#3775)
Both '-include' and '-imacros' take a file as an argument that will then be searched in the include path like a regular '#include "..."' statement in a source file. As such, they should not have their path converted to an absolute path. Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
This commit is contained in:
@@ -495,8 +495,8 @@ Execute(We should include several important flags):
|
||||
\ . ' -isystem ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incsystem'))
|
||||
\ . ' -idirafter ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/incafter'))
|
||||
\ . ' -iframework ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incframework'))
|
||||
\ . ' -include ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/foo bar'))
|
||||
\ . ' -imacros ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incmacros'))
|
||||
\ . ' -include file.h'
|
||||
\ . ' -imacros macros.h'
|
||||
\ . ' -Dmacro="value"'
|
||||
\ . ' -DGoal=9'
|
||||
\ . ' -D macro2'
|
||||
@@ -525,9 +525,9 @@ Execute(We should include several important flags):
|
||||
\ '-iframework',
|
||||
\ 'incframework',
|
||||
\ '-include',
|
||||
\ '''foo bar''',
|
||||
\ 'file.h',
|
||||
\ '-imacros',
|
||||
\ 'incmacros',
|
||||
\ 'macros.h',
|
||||
\ '-Dmacro="value"',
|
||||
\ '-DGoal=9',
|
||||
\ '-D',
|
||||
@@ -575,8 +575,8 @@ Execute(We should quote the flags we need to quote):
|
||||
\ . ' -isystem ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incsystem'))
|
||||
\ . ' -idirafter ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/incafter'))
|
||||
\ . ' -iframework ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incframework'))
|
||||
\ . ' -include ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/foo bar'))
|
||||
\ . ' -imacros ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incmacros'))
|
||||
\ . ' -include file.h'
|
||||
\ . ' -imacros macros.h'
|
||||
\ . ' ' . ale#Escape('-Dmacro="value"')
|
||||
\ . ' -DGoal=9'
|
||||
\ . ' -D macro2'
|
||||
@@ -608,9 +608,9 @@ Execute(We should quote the flags we need to quote):
|
||||
\ '-iframework',
|
||||
\ 'incframework',
|
||||
\ '-include',
|
||||
\ '''foo bar''',
|
||||
\ 'file.h',
|
||||
\ '-imacros',
|
||||
\ 'incmacros',
|
||||
\ 'macros.h',
|
||||
\ '-Dmacro="value"',
|
||||
\ '-DGoal=9',
|
||||
\ '-D',
|
||||
|
||||
Reference in New Issue
Block a user