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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to