Check for empty flags list
IndexErrors are not fun.
This commit is contained in:
parent
80dd5c2317
commit
3948b6efe2
@ -22,6 +22,6 @@ def PrepareClangFlags( flags, filename ):
|
|||||||
# When flags come from the compile_commands.json file, the first flag is
|
# When flags come from the compile_commands.json file, the first flag is
|
||||||
# usually the path to the compiler that should be invoked. We want to strip
|
# usually the path to the compiler that should be invoked. We want to strip
|
||||||
# that.
|
# that.
|
||||||
if not flags[ 0 ].startswith( '-' ):
|
if flags and not flags[ 0 ].startswith( '-' ):
|
||||||
return flags[ 1: ]
|
return flags[ 1: ]
|
||||||
return flags
|
return flags
|
||||||
|
Loading…
Reference in New Issue
Block a user