kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:449
+
+  size_t FirstNewline = R.find('\n');
+  if (FirstNewline != llvm::StringRef::npos)
----------------
or maybe just `R = Code.split('\n').first` ?


================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:452
+    R = R.take_front(FirstNewline);
+  if (R.size() > MaxLen)
+    R = R.take_front(MaxLen);
----------------
no need for the check, already performed in take_front.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62372



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

Reply via email to