[PATCH] D36075: [refactor] Initial support for refactoring action rules
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 31 01:15:15 PDT 2017
arphaman created this revision.
Herald added a subscriber: mgorny.
This patch implements a couple of functions that were described in my RFC from last week that’s available at http://lists.llvm.org/pipermail/cfe-dev/2017-July/054831.html. This patch adds the following pieces: `apply` function, `selectionRequirement` function, and the `selection::SourceSelectionRange` constraint.
This code will be used as a base to start moving the functionality and tests for clang-rename over to clang-refactor.
Unfortunately I had to use slightly different code for MSVC in the `selectionRequirement` overloads that take a lambda as MSVC fails to deduce the return type because of how it handles templates. I came up with a solution that seems to work with MSVC 2015 (the min version supported by LLVM), and I’ve tested the lambda overload code with cl 19.00.23506.
Repository:
rL LLVM
https://reviews.llvm.org/D36075
Files:
include/clang/Basic/LLVM.h
include/clang/Tooling/Refactoring/AtomicChange.h
include/clang/Tooling/Refactoring/DiagOr.h
include/clang/Tooling/Refactoring/RefactoringActionRules.h
include/clang/Tooling/Refactoring/RefactoringOperationController.h
include/clang/Tooling/Refactoring/RefactoringResult.h
include/clang/Tooling/Refactoring/SourceSelectionConstraints.h
unittests/Tooling/CMakeLists.txt
unittests/Tooling/RefactoringActionRulesTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36075.108874.patch
Type: text/x-patch
Size: 27594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170731/e447a486/attachment-0001.bin>
More information about the cfe-commits
mailing list