diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 8f7d041b9..b77b7a045 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -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; std::pair res = executeCommand(cmd); if (!res.first) {