[PATCH] D41733: [Driver] Suggest correctly spelled driver options

Jonathan Roelofs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 04:15:29 PST 2018


jroelofs added inline comments.


================
Comment at: lib/Driver/Driver.cpp:191
     if (A->getOption().hasFlag(options::Unsupported)) {
-      Diag(diag::err_drv_unsupported_opt) << A->getAsString(Args);
-      ContainsError |= Diags.getDiagnosticLevel(diag::err_drv_unsupported_opt,
-                                                SourceLocation()) >
+      unsigned DiagID;
+      auto ArgString = A->getAsString(Args);
----------------
modocache wrote:
> jroelofs wrote:
> > No need for this variable.
> There's a call below to `Diags.getDiagnosticsLevel`, which takes this ID as an argument. Are you suggesting I leave that line alone, and have it use the diagnostic level of `err_drv_unsupported_opt`, even if `err_drv_unsupported_opt_with_suggestion` is actually emitted here? That seems reasonable to me, but just want to make sure that's what you had in mind.
Oh, I didn't see that use... never mind.


Repository:
  rC Clang

https://reviews.llvm.org/D41733





More information about the cfe-commits mailing list