[PATCH] D109894: [clangd] Bail-out when an empty compile flag is encountered
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 17 01:13:53 PDT 2021
kadircet added a comment.
> I do half wonder whether we're going to get 3 steps further and then crash again when we call Command.front() :-)
I actually couldn't find any other places this could happen today (we seem to check for non-emptiness of compile commands most of the time). But I hadn't look into clang, apparently `createInvocationFromCommandLine` also assumes that.
Adding an assert and pushing the check to callers, as in theory they should probably check for it long before since many tools perform some sort of command line mangling. LMK if the check should reside in the callee instead.
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