Clang import; Pass include paths to clang

This commit is contained in:
Daniel Marjamäki 2020-01-09 19:15:01 +01:00
parent ae5dbe0575
commit 34a26c7dd7
1 changed files with 3 additions and 0 deletions

View File

@ -269,6 +269,9 @@ unsigned int CppCheck::check(const std::string &path)
} }
} }
for (const std::string &i: mSettings.includePaths)
flags += "-I" + i + " ";
const std::string cmd = clang + " -cc1 -ast-dump " + flags + path; const std::string cmd = clang + " -cc1 -ast-dump " + flags + path;
std::pair<bool, std::string> res = executeCommand(cmd); std::pair<bool, std::string> res = executeCommand(cmd);
if (!res.first) { if (!res.first) {