[all-commits] [llvm/llvm-project] d1e323: [libTooling] Change Tranformer's consumer to take ...
Eric Li via All-commits
all-commits at lists.llvm.org
Tue Feb 15 08:35:03 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d1e3235f604d65a62d25842305f54e43bd36681f
https://github.com/llvm/llvm-project/commit/d1e3235f604d65a62d25842305f54e43bd36681f
Author: Eric Li <li.zhe.hua at gmail.com>
Date: 2022-02-15 (Tue, 15 Feb 2022)
Changed paths:
M clang/include/clang/Tooling/Transformer/Transformer.h
M clang/lib/Tooling/Transformer/Transformer.cpp
M clang/unittests/Tooling/TransformerTest.cpp
Log Message:
-----------
[libTooling] Change Tranformer's consumer to take multiple changes
Previously, Transformer would invoke the consumer once per file modified per
match, in addition to any errors encountered. The consumer is not aware of which
AtomicChanges come from any particular match. It is unclear which sets of edits
may be related or whether an error invalidates any previously emitted changes.
Modify the signature of the consumer to accept a set of changes. This keeps
related changes (i.e. all edits from a single match) together, and clarifies
that errors don't produce partial changes.
Reviewed By: ymandel
Differential Revision: https://reviews.llvm.org/D119745
More information about the All-commits
mailing list