================
@@ -178,6 +178,56 @@ RangeSelector transformer::encloseNodes(std::string
BeginID,
return transformer::enclose(node(std::move(BeginID)),
node(std::move(EndID)));
}
+RangeSelector transformer::merge(RangeSelector First, RangeSelector Second) {
+ return [First,
+ Second](const MatchResult &Result) -> Expected<CharSourceRange> {
+ Expected<CharSourceRange> FirstRange = First(Result);
+ if (!FirstRange)
+ return FirstRange.takeError();
+ Expected<CharSourceRange> SecondRange = Second(Result);
+ if (!SecondRange)
+ return SecondRange.takeError();
+ // Result begin loc is the minimum of the begin locs of the two ranges.
+ SourceLocation B = FirstRange->getBegin() < SecondRange->getBegin()
----------------
yuhaouy wrote:
Thanks! Fixed.
https://github.com/llvm/llvm-project/pull/169560
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits