<div dir="ltr">Thank you for your response,<div>Therefore I think it's better to implement my tool to Clang Checker.</div><div><br></div><div>Thank you again for information!<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">----------------<div>Best regards,</div><div>Thien Tran.</div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 24 Aug 2020 at 19:01, Artem Dergachev <<a href="mailto:noqnoqneo@gmail.com">noqnoqneo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Static Analyzer's CheckerContext is a temporary entity that only
makes sense during path-sensitive analysis. libTooling doesn't
conduct path-sensitive analysis for you; in order to obtain
CheckerContext you'll need to instantiate the entire Static
Analyzer. Clang-Tidy is an example of a tool that does that but that
isn't supposed to be easy.<br>
<br>
Generally, you most likely don't want to use path-sensitive analysis
for anything other than bug-finding because it doesn't tell you
anything except "there *exists* an execution path through your code
that satisfies certain criteria";Â in particular, it can't be used
for proving absence of such path in your code. And you definitely
shouldn't try to build a tool that only runs one checker in
isolation; Static Analyzer's checker depend on each other for
correctness. For these reasons what you're doing probably doesn't
make sense and you'll have better luck either writing a new Static
Analyzer checker without creating a separate tool, or create a
separate tool without trying to use CheckerContext.<br>
<br>
<br>
<div>On 8/21/20 6:33 AM, Thien Tran via
cfe-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi everyone,
<div><br>
</div>
<div>I'm writing a C/C++ static analysis tool with LibTooling.
The program walks through the source code and searches for
custom criterias. The program works well but I still don't
know how to implement Clang Checker into LibTooling.</div>
<div><br>
</div>
<div>I'm reading the instruction "CLANG STATIC ANALYZER - A
Checker Developer’s Guide". Please tell me how to know/get the
current CheckerContext in a location of source code.</div>
<div><br>
</div>
<div>Thank you!<br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr"><br>
</div>
<div dir="ltr">----------------
<div>Best regards,</div>
<div>Thien Tran.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div>