<div dir="ltr">Thanks. I didn't realize that some flow information is available in clang tidy. All the example I saw were local matches of the AST.<div>But I see now that checks like <a href="https://clang.llvm.org/extra/clang-tidy/checks/misc-use-after-move.html">https://clang.llvm.org/extra/clang-tidy/checks/misc-use-after-move.html</a> do require analysis not dissimilar from what I need, so I now have something to study.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 12, 2017 at 3:50 PM, Jonas Toth <span dir="ltr"><<a href="mailto:jonas.toth@gmail.com" target="_blank">jonas.toth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>clang-tidy seems to be the correct point to start. It is made to
rewrite source code and is easy to begin with.</p>
<p>Take a look into the clang-tools-extra repository and browse the
code, there are a lot of examples. There is a dedicated tutorial
in the docs to get started as well.<br>
</p><div><div class="h5">
<br>
<div class="m_7300552229133785606moz-cite-prefix">Am 12.11.2017 um 14:43 schrieb Maurizio
Vitale via cfe-dev:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">hello clang clan,
<div><br>
</div>
<div> I'm getting started with checkers and I have one in mind
that I don't see a good way to implement.</div>
<div><br>
</div>
<div>The idea is to find all uses of putenv and replace them w/
setenv. This requires analyzing the argument to discover
constant parts in it (setenv require a separate variable
name). It also require to check that the argument is not
modified (or such modifications need also to be replaces w/
setenvs).</div>
<div><br>
</div>
<div>Is there a way to use the fixit infrastructure together
with the static analyzer?</div>
<div>If so, is it possible to make multiple changes part of the
same fixit?</div>
<div>What would be the recommended way of proceeding in this
case? any similar checks/analysis I can take a look at?</div>
<div><br>
</div>
<div>Thanks a lot,</div>
<div><br>
</div>
<div><br>
</div>
<div> Maurizio</div>
</div>
<br>
<fieldset class="m_7300552229133785606mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
cfe-dev mailing list
<a class="m_7300552229133785606moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a class="m_7300552229133785606moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>