+alexfh<br><br><div class="gmail_quote">On Mon Sep 29 2014 at 10:17:47 PM Daniel Dilts <<a href="mailto:diltsman@gmail.com">diltsman@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I am attempting to directly integrate with clang-tidy. I am attempting to call runClangTidy with a set of parameters that, to the best I can tell, match what it gets called with when clang-tidy calls it. clang-tidy returns 2x ClangTidyError objects, but mine returns none. I would appreciate any comments on what I could be doing wrong in the following code. I am linking against rev 218612.</div><div><br></div><div> std::string error;<br> auto db = JSONCompilationDatabase::loadFromBuffer(R"(<br>[<br> {<br> "directory": "D:/llvm",<br> "command" : "D:/llvm/build/Debug/bin/clang.exe class_name.cpp",<br> "file" : "class_name.cpp"<br> }<br>]<br>)", error);<br> ClangTidyGlobalOptions globalOptions{{}};<br> auto options = ClangTidyOptions::getDefaults();<br> options.Checks = "*,-clang-analyzer-alpha*,-llvm-include-order,-google-*,";<br> options.User = "DiltsDa";<br> auto optionsProvider = llvm::make_unique<DefaultOptionsProvider>(globalOptions, options);<br> std::vector<std::string> files{ "class_name.cpp" };</div><div> std::vector<ClangTidyError> errors;<br> auto stats = runClangTidy(std::move(optionsProvider), *db, files, &errors);<br></div></div>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div>