MCPcopy Create free account
hub / github.com/Taywee/args / FlagsForFile

Function FlagsForFile

.ycm_extra_conf.py:124–143  ·  view source on GitHub ↗
( filename, **kwargs )

Source from the content-addressed store, hash-verified

122
123
124def FlagsForFile( filename, **kwargs ):
125 if database:
126 # Bear in mind that compilation_info.compiler_flags_ does NOT return a
127 # python list, but a "list-like" StringVec object
128 compilation_info = GetCompilationInfoForFile(filename)
129 if not compilation_info:
130 return None
131
132 final_flags = MakeRelativePathsInFlagsAbsolute(
133 compilation_info.compiler_flags_,
134 compilation_info.compiler_working_dir_ )
135
136 else:
137 relative_to = os.path.dirname(os.path.abspath( __file__ ))
138 final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
139
140 return {
141 'flags': final_flags,
142 'do_cache': True
143 }

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected