<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>Awesome! Sending patches to contribute the new analyzer checkers sounds good to me.</div>
<div><br>
</div>
<div>Thanks for the insights on the Xml/Json dumpers. I am totally fine with letting this plugin out for now.</div>
<div><br>
</div>
<div>Out of curiosity, though, I have a couple of questions on some of the requirements you mention:</div>
<div><br>
</div>
<div>
<div>  - Documented, with appropriate Schema against which we can validate the output</div>
<div>What platform is available to run the validation?</div>
<div>Here we are using the “atd” language for the schema and an ocaml tool “atdgen”: <a href="http://mjambon.com/atdgen/atdgen-manual.html">http://mjambon.com/atdgen/atdgen-manual.html</a></div>
<div><br>
</div>
<div>  - Designed for C/C++/Objective-C, not Clang's specific ASTs</div>
<div>I’m not sure to understand this part. Can you elaborate?</div>
<div><br>
</div>
<div>  - Stable across Clang versions</div>
<div>I guess it would need to be maintained the same way ASTDumper.cpp is. Also, it does not seem impossible to merge the two files.</div>
<div><br>
</div>
</div>
<div>Mathieu</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>On Jun 19, 2014, at 9:48 AM, Nico Weber <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>cool!</div>
<div><br>
</div>
<div>The analyzer checkers look like they're generally useful from a quick glance. <a href="https://urldefense.proofpoint.com/v1/url?u=http://llvm.org/docs/DeveloperPolicy.html&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=DySJRSwIPwJgrlWcFuOjhjgW2TvEV7mDN%2BhK5RWHkOA%3D%0A&m=ELms8rEkCZHaJvhkuz9R9Rp4GzMgRk3fM6w0haB9MTY%3D%0A&s=16f0cc743787852a9cfae176ca709cf30701ea3bd223e998c909b5ee1b5ed434">http://llvm.org/docs/DeveloperPolicy.html</a>
 describes how to contribute patches. Look at the existing checker tests in the clang repo on how to write tests in clang's test suite.</div>
<div><br>
</div>
<div>There currently aren't any frontend plugins checked in. Ocaml tools for parsing json seem out of scope for the clang repo. Clang used to have a "dump xml" flag which was removed here: <a href="https://urldefense.proofpoint.com/v1/url?u=http://llvm.org/viewvc/llvm-project?view%3Drevision%26revision%3D127141&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=DySJRSwIPwJgrlWcFuOjhjgW2TvEV7mDN%2BhK5RWHkOA%3D%0A&m=ELms8rEkCZHaJvhkuz9R9Rp4GzMgRk3fM6w0haB9MTY%3D%0A&s=e9057ea6d77784d38531d6c8a54b84d5c8cb77db1ad25506cd7f63bc8fe0ec4a">http://llvm.org/viewvc/llvm-project?view=revision&revision=127141</a>
 Adding json output to clang itself seems reasonable if it fulfills the requirements in that commit log, but it should probably be done without a plugin. So I think the frontend plugin should probably continue living out of tree.</div>
<div><br>
</div>
<div>Nico</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Jun 19, 2014 at 9:30 AM, Mathieu Baudet <span dir="ltr">
<<a href="mailto:mathieubaudet@fb.com" target="_blank">mathieubaudet@fb.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I am looking for feedback on the possibility of contributing some of the clang plugins used at Facebook back to clang.<br>
<br>
We just made available a first subset of plugins here:  <a href="https://urldefense.proofpoint.com/v1/url?u=https://github.com/facebook/facebook-clang-plugins&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=DySJRSwIPwJgrlWcFuOjhjgW2TvEV7mDN%2BhK5RWHkOA%3D%0A&m=ELms8rEkCZHaJvhkuz9R9Rp4GzMgRk3fM6w0haB9MTY%3D%0A&s=d81ede14e210e443d06b0466bea8398e3d7f37618e3fcc26d3c33d4177b0b868" target="_blank">https://github.com/facebook/facebook-clang-plugins</a><br>
<br>
The plugins fall into two groups:<br>
1) Clang analyzer checkers for iOS;<br>
2) A clang frontend plugin to export the internal AST of clang in an Ocaml-friendly Json. This plugin comes with Ocaml libraries for testing, parsing, and visiting the AST.<br>
<br>
Except for the naming conventions, which are not uniform yet, and the need to update the referenced version of clang, the code should be in a relatively good state. In particular, everything has been tested quite at scale.<br>
<br>
Thanks!<br>
—<br>
<span class="HOEnZb"><font color="#888888">Mathieu Baudet<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="https://urldefense.proofpoint.com/v1/url?u=http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=DySJRSwIPwJgrlWcFuOjhjgW2TvEV7mDN%2BhK5RWHkOA%3D%0A&m=ELms8rEkCZHaJvhkuz9R9Rp4GzMgRk3fM6w0haB9MTY%3D%0A&s=73892c108031d43218c75ab5890955e44579010b61427cc72495152b3c45ccd5" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</font></span></blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</body>
</html>