зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b073baab86
Коммит
64c748af66
|
@ -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')
|
||||
|
|
Загрузка…
Ссылка в новой задаче