[PATCH] D106527: [clangd] Canonicalize compile flags before applying edits
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 22 04:42:34 PDT 2021
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:210
+ if (!ArgList.hasArgNoClaim(driver::options::OPT__DASH_DASH)) {
+ // In theory there might be more than one input, but clangd can't deal with
+ // them anyway.
----------------
sammccall wrote:
> More than one input is a really annoying error to diagnose, would we want to detect and log it here? Downside is this code runs *really* often.
Another option would be to delete all the OPT_INPUTs and append the actual filename (CompileCommand::Filename)
This seems like it would define this class of errors out of existence, maybe?
Layering doesn't make it easy to do that right here, though :-\
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106527/new/
https://reviews.llvm.org/D106527
More information about the cfe-commits
mailing list