[PATCH] D61774: [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 9 18:37:29 PDT 2019
ymandel created this revision.
ymandel added a reviewer: ilya-biryukov.
Herald added a subscriber: mgorny.
Herald added a project: clang.
NOTE: This is a preliminary revision for discussion; tests have not yet been provided.
The RangeSelector library defines a combinator language for specifying source
ranges based on bound id for AST nodes. The combinator approach follows the
design of the AST matchers. The RangeSelectors defined here will be used in
both RewriteRule, for specifying source affected by edit, and in Stencil for
specifying source to use constructively in a replacement.
This revision extends the SourceCode library with utility functions needed by
RangeSelector. Some of them come are copied from clang-tidy/utils/LexUtils,
since clang/Tooling can't depend on clang-tidy libraries.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D61774
Files:
clang/include/clang/Tooling/Refactoring/RangeSelector.h
clang/include/clang/Tooling/Refactoring/SourceCode.h
clang/lib/Tooling/Refactoring/CMakeLists.txt
clang/lib/Tooling/Refactoring/RangeSelector.cpp
clang/lib/Tooling/Refactoring/SourceCode.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61774.198969.patch
Type: text/x-patch
Size: 16517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190510/98fc58d4/attachment.bin>
More information about the cfe-commits
mailing list