[clang] [clang-scan-deps] Don't inspect Args[0] as an option (PR #109050)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 04:17:47 PDT 2024
================
@@ -839,9 +839,11 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
auto R = std::make_reverse_iterator(FlagsEnd);
for (auto I = R, E = Args.rend(); I != E; ++I) {
StringRef Arg = *I;
+ if ((I + 1) == E) // Don't inspect Args[0] as an option.
+ break;
----------------
mstorsjo wrote:
Sure, that works too; I changed it that way.
https://github.com/llvm/llvm-project/pull/109050
More information about the cfe-commits
mailing list