[PATCH] D128807: [clang][transformer] Finish plumbing `Note` all the way to the output.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 15:05:20 PDT 2022


ymandel added a comment.

Overall, looks good. But my main question is whether this functionality should be supported in the Edit's Metadata field instead.

Eric -- what do you think? You've thought a lot more about metadata recently.



================
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);
----------------
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.


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