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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 12:57:14 PDT 2023


MaskRay marked an inline comment as done.
MaskRay 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)));
----------------
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`.


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