[PATCH] D61972: [CommandLine] Don't allow duplicate categories.

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 20:20:12 PDT 2019


hintonda marked an inline comment as done.
hintonda added inline comments.


================
Comment at: llvm/lib/Support/CommandLine.cpp:453
     Categories[0] = &C;
-  else
+  else if (find_if(Categories, [&](OptionCategory *Cat) {
+             return (&C == Cat);
----------------
MaskRay wrote:
> Doesn't plain `find` work?
Ah, thanks for catching that.  It's cruft from a previous iteration where I was excluding index 0, but realized I didn't need to.  I'll fix, thanks...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61972





More information about the llvm-commits mailing list