summaryrefslogtreecommitdiffstats
path: root/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Tooling] Migrated APIs that take ownership of objects to unique_ptrDmitri Gribenko2019-08-301-4/+4
| | | | | | | | | | Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66960 llvm-svn: 370451
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-1/+1
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* [CrossTU] Add a function to retrieve original source location.Balazs Keri2019-07-241-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: A new function will be added to get the original SourceLocation for a SourceLocation that was imported as result of getCrossTUDefinition. The returned SourceLocation is in the context of the (original) SourceManager for the original source file. Additionally the ASTUnit object for that source file is returned. This is needed to get a SourceManager to operate on with the returned source location. The new function works if multiple different source files are loaded with the same CrossTU context. Reviewers: martong, shafik Reviewed By: martong Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65064 llvm-svn: 366884
* Revert r366449: [CrossTU] Add a function to retrieve original source location.Ilya Biryukov2019-07-181-33/+6
| | | | | | | | Reason: the commit breaks layering by adding a dependency on ASTUnit (which is inside clangFrontend) from the ASTImporter (which is inside clangAST). llvm-svn: 366453
* [CrossTU] Add a function to retrieve original source location.Balazs Keri2019-07-181-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A new function will be added to get the original SourceLocation for a SourceLocation that was imported as result of getCrossTUDefinition. The returned SourceLocation is in the context of the (original) SourceManager for the original source file. Additionally the ASTUnit object for that source file is returned. This is needed to get a SourceManager to operate on with the returned source location. The new function works if multiple different source files are loaded with the same CrossTU context. This patch can be treated as part of a bigger change that is needed to improve macro expansion handliong at plist generation. Reviewers: martong, shafik, a_sidorin, xazax.hun Reviewed By: martong Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64554 llvm-svn: 366449
* [analyzer] Add analyzer option to limit the number of imported TUsEndre Fulop2019-07-081-7/+21
| | | | | | | | | | | | Summary: During CTU analysis of complex projects, the loaded AST-contents of imported TUs can grow bigger than available system memory. This option introduces a threshold on the number of TUs to be imported for a single TU in order to prevent such cases. Differential Revision: https://reviews.llvm.org/D59798 llvm-svn: 365314
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* IWYU for llvm-config.h in clang. See r331124 for details.Nico Weber2018-04-301-1/+0
| | | | llvm-svn: 331177
* Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return ↵Roman Lebedev2018-02-271-2/+1
| | | | | | | | | | | | std::unique_ptr<>" This reverts commit rL326201 This broke gcc4.8 builds, compiler just segfaults:¬ http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/14909¬ http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/22673¬ llvm-svn: 326204
* [Tooling] [0/1] Refactor FrontendActionFactory::create() to return ↵Roman Lebedev2018-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | std::unique_ptr<> Summary: Noticed during review of D41102. I'm not sure whether there are any principal reasons why it returns raw owning pointer, or it is just a old code that was not updated post-C++11. I'm not too sure what testing i should do, because `check-all` is not error clean here for some reason, but it does not //appear// asif those failures are related to these changes. This is clang part. Clang-tools-extra part is D43780. Reviewers: klimek, bkramer, alexfh, pcc Reviewed By: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D43779 llvm-svn: 326201
* [CrossTU] Fix handling of Cross Translation Unit directory pathGabor Horvath2017-10-271-3/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D38842 llvm-svn: 316764
* Commit missing fixes for tool_file_renameReid Kleckner2017-09-231-4/+4
| | | | llvm-svn: 314051
* Add Cross Translation Unit support libraryGabor Horvath2017-09-221-0/+138
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 functionality an index is required. The index format is a flat text file but it might be replaced with a different solution in the near future. USRs are used as names to look up the functions definitions. This class also does caching to avoid redundant loading of AST files. Right now only function defnitions can be loaded using this API because this is what the in progress cross translation unit feature of the Static Analyzer requires. In to future this might be extended to classes, types etc. Differential Revision: https://reviews.llvm.org/D34512 llvm-svn: 313975
OpenPOWER on IntegriCloud