[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 23 03:53:47 PDT 2017
xazax.hun added inline comments.
Comment at: include/clang/Tooling/CrossTranslationUnit.h:53-58
+ /// \p CrossTUDir directory, called \p IndexName. In case the declaration is
+ /// found in the index the corresponding AST file will be loaded and the
+ /// definition of the function will be merged into the original AST using
+ /// the AST Importer. The declaration with the definition will be returned.
+ /// Note that the AST files should also be in the \p CrossTUDir.
> In the future we'll want to create an index interface around this (which will probably serve also what the refactoring integration would be based on), instead of piping files and directories into all classes.
> Perhaps we can start this by already pulling out a class ProjectIndex or somesuch, with methods like loadASTDefining(...)?
While I do agree to have an interface for that would be really good, but maybe it would be better to first review and accept this patch and after that design the interface in a follow-up patch (so https://reviews.llvm.org/D30691 is not blocked). What do you think?
More information about the cfe-commits