[PATCH] D152286: [Option] Support special argument "--"

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 22:23:35 PDT 2023


serge-sans-paille added inline comments.


================
Comment at: llvm/lib/Option/OptTable.cpp:475
+      while (++Index < End) {
+        Args.append(new Arg(getOption(InputOptionID), Str, Index,
+                            Args.getArgString(Index)));
----------------
MaskRay wrote:
> serge-sans-paille wrote:
> > Probably pedantic, but the other part of the code use ``std::make_unique<Arg>(...)` instead which at least convey the ownership very clearly.
> The primary code path has `Args.append(A.release());`. I think it's better to use `new` than `make_unique` + `release`.
Missed that. Thanks o/


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152286/new/

https://reviews.llvm.org/D152286



More information about the llvm-commits mailing list