<div dir="ltr"><div>Hi, thank you for your responses.</div><div><br></div>For Alexey, I have one method which can only be called in several special methods. Or one property, it must have a rvalue in any path, Thera are not general, I must do it by myself.<div><br></div><div>For Matthew, Clang Plugin is a better choice against modifying clang source code directly, but a plugin must be compatible with clang libraries in ABI level. Clang is a modern and modular project, so my question is, can I only link with several clang libraries, produce one tool which can do static analyze just like tools in clang-tools-extra? But it can also support path sensitive checking.<div><br></div><div>By the way, why clang-tidy can not support invoke path sensitive checkers?</div></div><div><br></div><div>P.S.: English is not my mother language, sorry for my poor English : (</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 12, 2017 at 5:49 PM Matthew Del Buono <<a href="mailto:mpdelbuono@gmail.com">mpdelbuono@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">To further answer the question - I think meritozh may be saying "I wish I could write checkers without modifying the clang source code" to which the response is "you can!" You can compile your checker as a clang plugin to a shared object file and then load that plugin. That way there's no need to recompile clang, but you are still able to write your own custom checkers.<div><br></div><div>You need to implement the clang_registerCheckers function in your plugin. See here: <a href="https://clang.llvm.org/doxygen/CheckerRegistry_8h_source.html" target="_blank">https://clang.llvm.org/doxygen/CheckerRegistry_8h_source.html</a><br><div><br></div><div>Does that answer your question?</div><div>-- Matthew P. Del Buono</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 11, 2017 at 11:27 PM, Alexey Knyshev via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi meritozh!<br><br>CSA supports and encourage you to write custom opt-in checkers. Please explain what does mean "general purpose" statement and in which context you have to implement a new tool?<br></div><br></div>Thanks, Alexey K<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-5094114838864952812h5">2017-12-12 9:33 GMT+03:00 gao ge via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-5094114838864952812h5"><div dir="ltr">Clang static analyzer is a great tool, but its checkers are only for general purpose. I want write some customized checkers. As I know, static analyzer is a port of clang, clang-tidy maybe a good choice, but it does not support path sensitive checker. It seems that I must modify clang source code? Can I write a standalone static analyzer which built on static analyzer module, but also support path sensitive checking?<div><br></div><div>Thanks,</div><div>meritozh</div></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><span class="m_-5094114838864952812HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-5094114838864952812m_7295071485866209929gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><a href="https://www.linkedin.com/profile/view?id=AAMAABn6oKQBDhBteiQnWsYm-S9yxT7wQkfWhSw" target="_blank">linkedin.com/profile</a><br><br><a href="http://github.com/alexeyknyshev" target="_blank">github.com/alexeyknyshev</a><span></span><a href="http:///" target="_blank"></a><span></span><br><a href="https://bitbucket.org/alexeyknyshev/" target="_blank">bitbucket.org/alexeyknyshev</a><br></div></div>
</font></span></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div>