[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-07-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D34512#800499, @klimek wrote: > In https://reviews.llvm.org/D34512#800490, @xazax.hun wrote: > > > It looks like Richard approved libTooling as a dependency for clang on the > > mailing list > > (http://lists.llvm.org/pipermail/cfe-dev/2017

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-07-06 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34512#800490, @xazax.hun wrote: > It looks like Richard approved libTooling as a dependency for clang on the > mailing list (http://lists.llvm.org/pipermail/cfe-dev/2017-July/054536.html). > If it is ok to have this code in libTooling (for no

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-07-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. It looks like Richard approved libTooling as a dependency for clang on the mailing list (http://lists.llvm.org/pipermail/cfe-dev/2017-July/054536.html). If it is ok to have this code in libTooling (for now), I think we could start/continue the review of this patch. h

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 104848. xazax.hun added a comment. - Updated to compile with trunk - Minor style fixes - Proper diagnostic when the index format is wrong https://reviews.llvm.org/D34512 Files: include/clang/Basic/DiagnosticFrontendKinds.td include/clang/Tooling/Cross

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek 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 functi

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 103710. xazax.hun added a comment. - Removed an unrelated change - Made the unit test more strict https://reviews.llvm.org/D34512 Files: include/clang/Tooling/CrossTranslationUnit.h lib/AST/ASTImporter.cpp lib/Tooling/CMakeLists.txt lib/Tooling/Cr

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-23 Thread Gábor Horváth via Phabricator via cfe-commits
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 fun

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added reviewers: dexonsmith, akyrtzi, benlangmuir, arphaman. klimek added a comment. Adding folks interested in the indexing discussion. Comment at: include/clang/Tooling/CrossTranslationUnit.h:53-58 + /// \p CrossTUDir directory, called \p IndexName. In case the declar

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Unfortunately, in order to make the Unit Test pass, I also had to modify the AST Importer. Are you ok with having that change as part of this patch (Aleksei might be a suitable person to review that part) or should I make a separate differential for that? https://re

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 103707. xazax.hun marked an inline comment as done. xazax.hun edited the summary of this revision. xazax.hun added a comment. - Added test for the USR dumping tool. - Added unit test for the CrossTranslationUnit class - Added documentation for the API entry

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. General direction looks good. I think in addition to integration tests through the static analyzer, we should still have unit tests. Comment at: include/clang/Tooling/CrossTranslationUnit.h:47 + + const FunctionDecl *getCTUDefinition(const FunctionDec

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 103571. xazax.hun added a comment. - Add a tool to dump USRs for function definitions. It can be used to create index files. https://reviews.llvm.org/D34512 Files: include/clang/Tooling/CrossTranslationUnit.h lib/Tooling/CMakeLists.txt lib/Tooling/

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Herald added a subscriber: mgorny. This patch introduces a class that can help to build tools that require cross translation unit facilities. This class allows function definitions to be loaded from external AST files based on an index. In order to use this funct