[PATCH] D83697: [clang][cli] Port Frontend option flags to new option parsing system

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 20 13:50:21 PST 2020


dexonsmith requested changes to this revision.
dexonsmith added a comment.
This revision now requires changes to proceed.

This is close, just a few nits. Also, since this has the first uses of `IsNegative`, it'd be great to have a couple of tests for one of the flags it's used on.



================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:137
 
+static llvm::Optional<bool>
+normalizeSimpleNegativeFlag(OptSpecifier Opt, unsigned TableIndex,
----------------
Nit: clang/Basic/LLVM.h pulls Optional in `namespace clang` so you don't need the `llvm::` qualifier.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:138-139
+static llvm::Optional<bool>
+normalizeSimpleNegativeFlag(OptSpecifier Opt, unsigned TableIndex,
+                            const ArgList &Args, DiagnosticsEngine &Diags) {
+  if (Args.hasArg(Opt))
----------------
Please drop parameter names for `TableIndex` and `Diags`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83697



More information about the cfe-commits mailing list