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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits