File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1111
1212#include " MrDocsSettingsDB.hpp"
1313#include < mrdocs/Support/Path.hpp>
14+ #include < llvm/Support/Program.h>
1415
1516namespace clang {
1617namespace mrdocs {
@@ -59,18 +60,18 @@ MrDocsSettingsDB::MrDocsSettingsDB(ConfigImpl const& config)
5960 return {};
6061 });
6162 }
63+
64+ llvm::ErrorOr<std::string> clangPath = llvm::sys::findProgramByName (" clang" );
6265
6366 for (auto const & pathName: sourceFiles)
6467 {
6568 // auto fileName = files::getFileName(pathName);
6669 auto parentDir = files::getParentDir (pathName);
6770
6871 std::vector<std::string> cmds;
69- cmds.emplace_back (" clang" );
72+ cmds.emplace_back (clangPath ? *clangPath : " clang" );
7073 cmds.emplace_back (" -fsyntax-only" );
7174 cmds.emplace_back (" -std=c++23" );
72- cmds.emplace_back (" -pedantic-errors" );
73- cmds.emplace_back (" -Werror" );
7475 cmds.emplace_back (" -x" );
7576 cmds.emplace_back (" c++" );
7677 cmds.emplace_back (pathName);
You can’t perform that action at this time.
0 commit comments