[PATCH] D109894: [clangd] Bail-out when an empty compile flag is encountered

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 16 12:39:09 PDT 2021


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

I do half wonder whether we're going to get 3 steps further and then crash again when we call `Command.front()` :-)

This change looks good.

It also seems tempting to inject an empty check in GlobalCompilationDatabase (where we convert `vector<CompileCommand>` -> `optional`.
But I can see a perverse situation where e.g. background indexing would "just fail" at the driver level today, but the change would lead to using a fallback command and attempting to parse some binary file. (Ugh, garbage in compile_commands...)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109894



More information about the cfe-commits mailing list