[PATCH] D106794: Revert "Revert "[clangd] Canonicalize compile flags before applying edits""
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 27 05:23:17 PDT 2021
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:208
+ !OriginalArgs.empty() &&
+ driver::getDriverMode(OriginalArgs[0], OriginalArgs).equals("cl");
+ // ParseArgs propagates missig arg/opt counts on error, but preserves
----------------
makeArrayRef(OriginalArgs).slice(1)?
================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:213
+ auto ArgList = OptTable.ParseArgs(
+ OriginalArgs, IgnoredCount, IgnoredCount, /*FlagsToInclude=*/0,
+ /*FlagsToExclude=*/IsCLMode ? 0 : driver::options::CLOption);
----------------
include should be IsCLMode ? (CLOption | CoreOption) : /*everything*/0?
================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:214
+ OriginalArgs, IgnoredCount, IgnoredCount, /*FlagsToInclude=*/0,
+ /*FlagsToExclude=*/IsCLMode ? 0 : driver::options::CLOption);
+
----------------
exclude NoDriverOption | ( IsCLMode ? 0 : CLOption)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106794/new/
https://reviews.llvm.org/D106794
More information about the cfe-commits
mailing list