From f54a350e0cd4407e91e7f8428783ca28911d89e8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 10 Feb 2019 11:58:18 +0800 Subject: [PATCH] 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. --- src/project.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/project.cc b/src/project.cc index 71f43bdb..d04d67c2 100644 --- a/src/project.cc +++ b/src/project.cc @@ -215,6 +215,8 @@ std::vector GetFallback(const std::string path) { std::vector argv{"clang"}; if (sys::path::extension(path) == ".h") 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)); return argv; }