Enhance option suggestion for options expected an argument (PR driver/89861).
authorMartin Liska <mliska@suse.cz>
Mon, 1 Apr 2019 07:17:38 +0000 (09:17 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 1 Apr 2019 07:17:38 +0000 (07:17 +0000)
commit90f1430589e2f3efa8136346615fc08edfd936f3
tree3a3157c04dae0517a76d552a6e57170e47b398e3
parent2a82beaa820410600441f36e49e91a3a18e04fc5
Enhance option suggestion for options expected an argument (PR driver/89861).

2019-04-01  Martin Liska  <mliska@suse.cz>

PR driver/89861
* opt-suggestions.c (option_proposer::build_option_suggestions):
Add variant without any argument in order to provide better
hints.
2019-04-01  Martin Liska  <mliska@suse.cz>

PR driver/89861
* gcc.dg/spellcheck-options-18.c: New test.
* gcc.dg/spellcheck-options-19.c: New test.
* gcc.dg/spellcheck-options-20.c: New test.
* gcc.dg/spellcheck-options-13.c: Adjust expected output.
* gcc.dg/completion-2.c: Add one variant with no argument.

From-SVN: r270053
gcc/ChangeLog
gcc/opt-suggestions.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/completion-2.c
gcc/testsuite/gcc.dg/spellcheck-options-13.c
gcc/testsuite/gcc.dg/spellcheck-options-18.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/spellcheck-options-19.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/spellcheck-options-20.c [new file with mode: 0644]