Commit 8af0bf60 authored by Jason Rhinelander's avatar Jason Rhinelander

Revert clang system path hack

It isn't needed after all; the bug was actually a debian ycmd problem
(debian bug 825905).
parent c6cef51f
import os
import subprocess
import ycm_core
import re
flags = [
'-x', 'c++',
'-I', '.',
'-I', '/usr/include/eigen3',
'-I', 'build' # To pick up the generated creativity/config.hpp
......@@ -56,22 +56,8 @@ def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
new_flags.append( new_flag )
return new_flags
def LoadSystemIncludes():
regex = re.compile(ur'(?:\#include \<...\> search starts here\:)(?P<list>.*?)(?:End of search list)', re.DOTALL);
process = subprocess.Popen(['clang', '-v', '-E', '-x', 'c++', '-'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE);
process_out, process_err = process.communicate('');
output = process_out + process_err;
includes = [];
for p in, output).group('list').split('\n'):
p = p.strip();
if len(p) > 0 and p.find('(framework directory)') < 0:
return includes;
def FlagsForFile( filename, **kwargs ):
final_flags = MakeRelativePathsInFlagsAbsolute( flags, DirectoryOfThisScript() ) + LoadSystemIncludes()
final_flags = MakeRelativePathsInFlagsAbsolute( flags, DirectoryOfThisScript() )
return {
'flags': final_flags,
'do_cache': True
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment