[PATCH] D64518: [LibTooling] Relax Transformer to allow rewriting macro expansions
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 10 10:49:28 PDT 2019
ymandel created this revision.
ymandel added a reviewer: ilya-biryukov.
Herald added a project: clang.
Currently, Transformer rejects any changes to source locations inside macro
expansions. This change relaxes that constraint to allow rewrites when the
entirety of the expansion is replaced, since that can be mapped to replacing the
entirety of the expansion range in the file source. This change makes
Transformer consistent with the handling of edit ranges in `clang::edit::Commit`
(which is used, for example, for applying `FixItHint`s from diagnostics).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64518
Files:
clang/lib/Tooling/Refactoring/Transformer.cpp
clang/unittests/Tooling/TransformerTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64518.209020.patch
Type: text/x-patch
Size: 8455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190710/fa47333c/attachment.bin>
More information about the cfe-commits
mailing list