Preventing possible TypeError with StringVec
It was possible to get a traceback if results[ 'flags' ] was a StringVec; the code would try to perform results[ 'flags' ] += self.special_clang_flags and this would then fail because the clang flags would be a Python list.
This commit is contained in:
parent
ebfd9bfbb4
commit
11a7746753
@ -55,9 +55,10 @@ class Flags( object ):
|
||||
if not results.get( 'flags_ready', True ):
|
||||
return None
|
||||
|
||||
flags = list( results[ 'flags' ] )
|
||||
if add_special_clang_flags:
|
||||
results[ 'flags' ] += self.special_clang_flags
|
||||
sanitized_flags = _PrepareFlagsForClang( results[ 'flags' ], filename )
|
||||
flags += self.special_clang_flags
|
||||
sanitized_flags = _PrepareFlagsForClang( flags, filename )
|
||||
|
||||
if results[ 'do_cache' ]:
|
||||
self.flags_for_file[ filename ] = sanitized_flags
|
||||
|
Loading…
x
Reference in New Issue
Block a user