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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 19:57:22 PDT 2019


MaskRay 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);
----------------
Doesn't plain `find` work?


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