<div class="gmail_quote">On Wed Dec 10 2014 at 3:25:00 AM mobi phil <<a href="mailto:mobi@mobiphil.com">mobi@mobiphil.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>wonder if it makes sense to extend ClangTool to facilitate saving, loading of ASTUnit for refactoring class of applications. </div><div><br></div><div>ASTUnit::save seems to be straightforward with one string (filename), however the LoadFromASTFile seems to be rather complex</div><div><br></div><div><br></div><div><div>std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(</div><div>    const std::string &Filename, IntrusiveRefCntPtr<DiagnosticsEngine> Diags,</div><div>    const FileSystemOptions &FileSystemOpts, bool OnlyLocalDecls,</div><div>    ArrayRef<RemappedFile> RemappedFiles, bool CaptureDiagnostics,</div><div>    bool AllowPCHWithCompilerErrors, bool UserFilesAreVolatile)</div></div><div><br></div><div>for most of AST manipulation, all those details are probably not important and should be deduced or defaults should be used, or?</div><div><br></div><div>In all this reasoning I assumed that once AST created it can be saved to file and re-loaded in another execution of the tool to further process the AST. Hopefully I am not wrong</div></div></blockquote><div><br></div><div>Multiple questions:</div><div>1. You should already be able to use ASTUnit to save and load ASTs - why do you need integration with ClangTool?</div><div>2. What are you trying to do? Why do you want to store the AST?</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><br></div><div><br clear="all"><div><br></div><br><div>rgrds,<br>mobi phil<br><br>being mobile, but including technology<br><a href="http://mobiphil.com" target="_blank">http://mobiphil.com</a></div>
</div></div>
______________________________<u></u>_________________<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" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div>