[all-commits] [llvm/llvm-project] da76a4: [clang][transformer] Add `merge` range-selector fo...
Yu Hao via All-commits
all-commits at lists.llvm.org
Mon Dec 1 12:24:28 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: da76a48943f090bc6d5aa8b462d07d361f401d37
https://github.com/llvm/llvm-project/commit/da76a48943f090bc6d5aa8b462d07d361f401d37
Author: Yu Hao <yuhaoyu at google.com>
Date: 2025-12-01 (Mon, 01 Dec 2025)
Changed paths:
M clang/include/clang/Tooling/Transformer/RangeSelector.h
M clang/lib/Tooling/Transformer/Parsing.cpp
M clang/lib/Tooling/Transformer/RangeSelector.cpp
M clang/unittests/Tooling/RangeSelectorTest.cpp
Log Message:
-----------
[clang][transformer] Add `merge` range-selector for selecting the merge of two ranges. (#169560)
This new range-selector `merge` takes in two ranges and selects from
min(begin locs of input ranges) to max(end locs of input ranges). This
is useful for when the user needs to select a range that is a merge of
two arbitrary ranges (potentially overlapped and out of order).
The existing `enclose` range-selector does something similar but it
requires the first range's begin loc appears before the second range's
end loc. The `merge` range-selector complements `enclose`.
---------
Co-authored-by: Yitzhak Mandelbaum <ymand at users.noreply.github.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list