<div dir="ltr">+pcc <br><br><div class="gmail_quote"><div dir="ltr">On Sat, Aug 1, 2015 at 7:14 PM <a href="mailto:rzaghi@mosaic3dx.com">rzaghi@mosaic3dx.com</a> <<a href="mailto:rzaghi@mosaic3dx.com">rzaghi@mosaic3dx.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">
<div style="font-size:8pt;color:#000000;background-color:#ffffff;font-family:'Courier New',monospace">
<p>Hey</p>
<p><br>
</p>
<p>I've tried and it works really well actually <img alt="😊" style="vertical-align:bottom" src="cid:0c539315-0817-41d6-8994-c069b18b26ee"></p>
<p><span style="font-size:8pt"><br>
</span></p>
<p><span style="font-size:8pt">You can pass many source files to clang-query and it takes a while the first time to parse and build the AST.</span><br>
</p>
<p><br>
</p>
<p>But once it's saved the AST, <span style="font-size:8pt">the next time you can </span><span style="font-size:8pt">get to clang-query prompt almost instantly which is what I wanted.</span></p>
<p><br>
</p>
<p>I never submitted any patches so will do this as my first one in the next few days.</p></div></div></blockquote><div><br></div><div>Cool! </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:8pt;color:#000000;background-color:#ffffff;font-family:'Courier New',monospace">
<p><br>
</p>
<p>Any suggestions on what command line option to add to clang-query? May be "--save-ast" or something similar?</p></div></div></blockquote><div><br></div><div>We can bikeshed that on the code review :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:8pt;color:#000000;background-color:#ffffff;font-family:'Courier New',monospace">
<p><br>
</p>
<p><br>
</p>
<p>-Ramin</p>
<p><br>
</p>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Nikola Smiljanic <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>><br>
<b>Sent:</b> 27 July 2015 11:48<br>
<b>To:</b> <a href="mailto:rzaghi@mosaic3dx.com" target="_blank">rzaghi@mosaic3dx.com</a><br>
<b>Cc:</b> Manuel Klimek; <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a></font></div></div></div></div><div dir="ltr"><div style="font-size:8pt;color:#000000;background-color:#ffffff;font-family:'Courier New',monospace"><div style="color:rgb(0,0,0)"><div dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><br>
<b>Subject:</b> Re: [cfe-dev] clang-query cache?</font></div></div></div></div><div dir="ltr"><div style="font-size:8pt;color:#000000;background-color:#ffffff;font-family:'Courier New',monospace"><div style="color:rgb(0,0,0)">
<div>
<div dir="ltr">Yes, have a look at ASTReader and ASTWriter.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jul 27, 2015 at 8:46 PM, <a href="mailto:rzaghi@mosaic3dx.com" target="_blank">
rzaghi@mosaic3dx.com</a> <span dir="ltr"><<a href="mailto:rzaghi@mosaic3dx.com" target="_blank">rzaghi@mosaic3dx.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Correct. I want the AST to be stored on disk.<br>
<br>
I am not as familiar with the datastructure but if the classes provide a means of serialzsing and deserializing then I would imagine I can get it done in a couple weeks myself?<br>
<br>
Is there any such functionality in the node classes?<br>
<br>
R.<br>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>><br>
<b>Sent:</b> 27 July 2015 10:50:09<br>
<b>To:</b> Nikola Smiljanic<br>
<b>Cc:</b> <a href="mailto:rzaghi@mosaic3dx.com" target="_blank">rzaghi@mosaic3dx.com</a>;
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><span><br>
<b>Subject:</b> Re: [cfe-dev] clang-query cache?</span></font>
<div> </div>
</div>
<div>
<div>
<div>
<div dir="ltr">So, that would mean storing ASTs on disk and then loading them instead of parsing the files. That would sound like a reasonable enough feature to implement, if somebody is up for it.</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Jul 27, 2015 at 10:48 AM Nikola Smiljanic <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@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">If I understand correctly he wants to run it over entire codebase as opposed to feed each file individually.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote"></div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On Mon, Jul 27, 2015 at 3:32 PM, Manuel Klimek <span dir="ltr">
<<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Well, it depends. If you have certain kinds of queries you want to repeat, there are projects like kythe [1]. Otherwise, clang-query allows you to match the whole AST, so I'm not sure what you'd want to cache. Do you want to cache sub-queries
that do not change?
<div><br>
</div>
</div>
</blockquote>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>[1] <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_google_kythe&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=RGEB26MVTqKGZXxvcZqaaRMp_fkvS93UH30yi2rx0bw&s=wVSUYuH6Xq1DgjTf64kuojS4d58RPqCzAUDP_xapim4&e=" target="_blank">
https://github.com/google/kythe</a></div>
</div>
</blockquote>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<div class="gmail_quote"><span>
<div dir="ltr">On Sat, Jul 25, 2015 at 3:45 PM <a href="mailto:rzaghi@mosaic3dx.com" target="_blank">
rzaghi@mosaic3dx.com</a> <<a href="mailto:rzaghi@mosaic3dx.com" target="_blank">rzaghi@mosaic3dx.com</a>> wrote:<br>
</div>
</span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span>Is it possible to cache clang-query results so I don't need to run it for every file in a project evertime?<br>
<br>
- Ramin<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
</span><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" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote>
</div>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div></blockquote></div></div>