forked from mirrors/gecko-dev
Bug 1632497 - Make YouCompleteMe clangd completer work. r=jgraham
We need to use the new Settings() API, instead of the deprecated FlagsForFile. Though in practice we can just delegate to it and it works out of the box. Differential Revision: https://phabricator.services.mozilla.com/D72152
This commit is contained in:
parent
b073baab86
commit
64c748af66
1 changed files with 7 additions and 0 deletions
|
|
@ -32,6 +32,13 @@ def _is_likely_cpp_header(filename):
|
|||
cpp_file = filename[:-1] + 'cpp'
|
||||
return os.path.exists(cpp_file)
|
||||
|
||||
|
||||
def Settings(**kwargs):
|
||||
if kwargs[ 'language' ] == 'cfamily':
|
||||
return FlagsForFile(kwargs['filename'])
|
||||
return {}
|
||||
|
||||
|
||||
def FlagsForFile(filename):
|
||||
output = subprocess.check_output([path, 'compileflags', filename])
|
||||
output = output.decode('utf-8')
|
||||
|
|
|
|||
Loading…
Reference in a new issue