summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Refactoring/ASTSelection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* PR40096: Forwards-compatible with C++20 rule regarding aggregates not having ↵David Blaikie2018-12-191-2/+0
| | | | | | | | | | user-declared ctors Looks like these were in place to make these types move-only. That's generally not a feature that the type should prescribe (unless it's an inherent limitation) - instead leaving it up to the users of a type. llvm-svn: 349669
* [refactor][selection] canonicalize decl ref callee to the call exprAlex Lorenz2017-11-141-13/+48
| | | | | | | We would like to extract the full call when just the callee function is selected llvm-svn: 318215
* [refactor][selection] canonicalize member expr callee to the fullAlex Lorenz2017-11-141-1/+12
| | | | | | | | member call expression We would like to extract the full call when just the callee is selected. llvm-svn: 318205
* [refactor][extract] avoid extracting expressions from types in functionsAlex Lorenz2017-11-141-2/+4
| | | | llvm-svn: 318169
* [refactor][selection] canonicalize selected string literal to objcAlex Lorenz2017-11-021-1/+22
| | | | | | string literal when possible llvm-svn: 317224
* [refactor][selection] code ranges can be selected in objc methodsAlex Lorenz2017-11-011-4/+7
| | | | llvm-svn: 317054
* [refactor] select the entire DeclStmt if one ifs decls is selectedAlex Lorenz2017-10-311-5/+17
| | | | llvm-svn: 316971
* [refactor] Initial outline of implementation of "extract function" refactoringAlex Lorenz2017-10-241-0/+37
| | | | | | | | | | | | | | | | | | | This commit adds an initial, skeleton outline of the "extract function" refactoring. The extracted function doesn't capture variables / rewrite code yet, it just basically does a simple copy-paste. The following initiation rules are specified: - extraction can only be done for executable code in a function/method/block. This means that you can't extract a global variable initialize into a function right now. - simple literals and references are not extractable. This commit also adds support for full source ranges to clang-refactor's test mode. Differential Revision: https://reviews.llvm.org/D38982 llvm-svn: 316465
* [refactor] selection: new CodeRangeASTSelection represents a set of selectedAlex Lorenz2017-10-181-0/+105
| | | | | | | | | | | consecutive statements This commit adds a CodeRangeASTSelection value to the refactoring library. This value represents a set of selected statements in one body of code. Differential Revision: https://reviews.llvm.org/D38835 llvm-svn: 316104
* Recommit r312127: [refactor] AST selection tree should contain syntacticAlex Lorenz2017-08-301-0/+22
| | | | | | | | | | | | | | | | form of PseudoObjectExpr The new commit adjusts unittest test code compilation options so that the Objective-C code in the unittest can be parsed on non-macOS platforms. Original message: The AST selection finder now constructs a selection tree that contains only the syntactic form of PseudoObjectExpr. This form of selection tree is more meaningful when doing downstream analysis as we're interested in the syntactic features of the AST and the correct lexical parent relation. llvm-svn: 312132
* Revert r312127 as the ObjC unittest code fails to compile on LinuxAlex Lorenz2017-08-301-22/+0
| | | | llvm-svn: 312131
* [refactor] AST selection tree should contain syntactic formAlex Lorenz2017-08-301-0/+22
| | | | | | | | | | | of PseudoObjectExpr The AST selection finder now constructs a selection tree that contains only the syntactic form of PseudoObjectExpr. This form of selection tree is more meaningful when doing downstream analysis as we're interested in the syntactic features of the AST and the correct lexical parent relation. llvm-svn: 312127
* [refactor] Examine the whole range for ObjC @implementation declsAlex Lorenz2017-08-301-2/+16
| | | | | | when computing the AST selection llvm-svn: 312121
* Add missing std::move callAlex Lorenz2017-08-241-1/+1
| | | | | | | This should fix http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_build/41578/ llvm-svn: 311656
* [refactor] Add the AST source selection componentAlex Lorenz2017-08-241-0/+191
This commit adds the base AST source selection component to the refactoring library. AST selection is represented using a tree of SelectedASTNode values. Each selected node gets its own selection kind, which can actually be None even in the middle of tree (e.g. statement in a macro whose child is in a macro argument). The initial version constructs a "raw" selection tree, without applying filters and canonicalisation operations to the nodes. Differential Revision: https://reviews.llvm.org/D35012 llvm-svn: 311655
OpenPOWER on IntegriCloud