[PATCH] D109506: [clangd] Print current request context along with the stack trace

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 11 01:50:48 PDT 2021


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

Looks great, thanks!
Happy to commit this for you if you don't have access.



================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:1327
+        llvm::errs() << "Signalled during AST worker action: "
+                     << (CurrentRequest ? CurrentRequest->Name : "") << "\n";
+        crashDumpParseInputs(llvm::errs(), FileInputs);
----------------
nit: this copies CurrentRequest->Name, which seems like a very avoidable allocation in a crash handler... just use `if`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109506



More information about the cfe-commits mailing list