This revision was automatically updated to reflect the committed changes.
Closed by commit rC321917: [Driver] Suggest correctly spelled driver options
(authored by modocache, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D41733?vs=128736=128824#toc
Repository:
rC Clang
bruno accepted this revision.
bruno added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM.
Repository:
rC Clang
https://reviews.llvm.org/D41733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
modocache updated this revision to Diff 128736.
modocache added a comment.
Test -Xclang as well. Thanks, @v.g.vassilev!
Repository:
rC Clang
https://reviews.llvm.org/D41733
Files:
include/clang/Basic/DiagnosticDriverKinds.td
lib/Driver/Driver.cpp
lib/Frontend/CompilerInvocation.cpp
v.g.vassilev added inline comments.
Comment at: test/Frontend/unknown-arg.c:3
+// RUN: FileCheck %s
+// RUN: not %clang_cc1 %s --hel[ -### 2>&1 | \
+// RUN: FileCheck %s --check-prefix=DID-YOU-MEAN
Could we also make sure that things passed with `-Xclang` are
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,
-
modocache updated this revision to Diff 128681.
modocache added a comment.
Add 'did you mean' suggestions for -cc1 invocations as well.
Repository:
rC Clang
https://reviews.llvm.org/D41733
Files:
include/clang/Basic/DiagnosticDriverKinds.td
lib/Driver/Driver.cpp
modocache added a comment.
Thank you, @bruno! Good idea, I'll add a `-cc1` invocation test.
Comment at: lib/Driver/Driver.cpp:191
if (A->getOption().hasFlag(options::Unsupported)) {
- Diag(diag::err_drv_unsupported_opt) << A->getAsString(Args);
- ContainsError
bruno added a comment.
This is great!
I assume it also works for cc1 invocations, right? Can you also add a test for
%clang_cc1?
Repository:
rC Clang
https://reviews.llvm.org/D41733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
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,
-
modocache created this revision.
modocache added reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu.
Depends on https://reviews.llvm.org/D41732.
Utilities such as `opt`, when invoked with arguments that are very
nearly spelled correctly, suggest the correctly spelled options:
bin/opt -hel
10 matches
Mail list logo