[PATCH] D41733: [Driver] Suggest correctly spelled driver options
Jonathan Roelofs via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 4 12:22:30 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);
----------------
No need for this variable.
================
Comment at: lib/Driver/Driver.cpp:218
for (const Arg *A : Args.filtered(options::OPT_UNKNOWN)) {
- auto ID = IsCLMode() ? diag::warn_drv_unknown_argument_clang_cl
- : diag::err_drv_unknown_argument;
-
- Diags.Report(ID) << A->getAsString(Args);
- ContainsError |= Diags.getDiagnosticLevel(ID, SourceLocation()) >
+ unsigned DiagID;
+ auto ArgString = A->getAsString(Args);
----------------
Likewise.
Repository:
rC Clang
https://reviews.llvm.org/D41733
More information about the cfe-commits
mailing list