[PATCH] D13093: [ELF2] - output of all unknown arguments instead of only one
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 06:15:17 PDT 2015
> - for (auto *Arg : Args.filtered(OPT_UNKNOWN))
> - error(Twine("unknown argument: ") + Arg->getSpelling());
> +
> + auto unknowns = Args.filtered(OPT_UNKNOWN);
> + for (llvm::opt::arg_iterator Arg = unknowns.begin(), End = unknowns.end(); Arg != End; ++Arg)
> + warning(Twine("warning: unknown argument: ") + (*Arg)->getSpelling());
> + if (unknowns.begin() != unknowns.end())
> + error(Twine("unknown argument(s) found"));
> +
You should still be able to use a range loop:
auto Unknowns = Args.filtered(OPT_UNKNOWN);
for (auto *Arg : Unknows)
....
if (Unkonws.begin() != Unknows.end())
...
More information about the llvm-commits
mailing list