[Lldb-commits] [PATCH] D91103: [tooling] Add support for fixits that indicate code will need reformatting

Kadir Cetinkaya via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 11 04:30:41 PST 2020


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:677
     // If requested and possible, create a message like "change 'foo' to 'bar'".
-    if (SyntheticMessage && FixIts.size() == 1) {
-      const auto &FixIt = FixIts.front();
+    if (SyntheticMessage && *SingleFixIt) {
+      const auto &FixIt = **SingleFixIt;
----------------
nit: you can check `Edits.size() == 1` here, `s/SingleFixIt/FixItForLastEdit` and get rid of the optional.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91103/new/

https://reviews.llvm.org/D91103



More information about the lldb-commits mailing list