mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-24 08:35:08 +00:00
GetFallback: append clang.extraArgs
When compile_commands.json is absent, GetFallback is called to get default clang command line when there is no .ccls or .ccls is empty.
This commit is contained in:
parent
8724985388
commit
6185d69d9d
@ -227,6 +227,8 @@ std::vector<const char *> GetFallback(const std::string path) {
|
|||||||
std::vector<const char *> argv{"clang"};
|
std::vector<const char *> argv{"clang"};
|
||||||
if (sys::path::extension(path) == ".h")
|
if (sys::path::extension(path) == ".h")
|
||||||
argv.push_back("-xobjective-c++-header");
|
argv.push_back("-xobjective-c++-header");
|
||||||
|
for (const std::string &arg : g_config->clang.extraArgs)
|
||||||
|
argv.push_back(Intern(arg));
|
||||||
argv.push_back(Intern(path));
|
argv.push_back(Intern(path));
|
||||||
return argv;
|
return argv;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user