[PATCH] D128807: [clang][transformer] Finish plumbing `Note` all the way to the output.
Clement Courbet via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 30 00:46:38 PDT 2022
courbet added inline comments.
================
Comment at: clang/lib/Tooling/Transformer/RewriteRule.cpp:56
T.Range = *EditRange;
- T.Replacement = std::move(*Replacement);
- T.Metadata = std::move(*Metadata);
+ if (E.Replacement) {
+ auto Replacement = E.Replacement->eval(Result);
----------------
ymandel wrote:
> Can this ever be null? I assume the intent was "no" (in which case I'd recommend an assert instead), but I'm open to the idea that it's valid, just want to understand better.
Given that we provide an `EditGenerator edit(ASTEdit)`, we can't ever be sure that the user won't give us an empty replacement.
I've split this off to a separate patch here with a test to show the issue: https://reviews.llvm.org/D128887
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128807/new/
https://reviews.llvm.org/D128807
More information about the cfe-commits
mailing list