Fix bogus option suggestions for RejectNegative options (PR driver/71651)
commit413c4f6cc73ad5380fb4a533d7b60dd3de7386ed
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jun 2016 14:28:50 +0000 (30 14:28 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jun 2016 14:28:50 +0000 (30 14:28 +0000)
tree40d1bc99d4ff173785ae8b7f061698acb8a05f26
parentadc565bd1d50272e67cc6789d203931f402697e5
Fix bogus option suggestions for RejectNegative options (PR driver/71651)

gcc/ChangeLog:
PR driver/71651
* gcc.c (driver::build_option_suggestions): Pass "option" to
add_misspelling_candidates.
* opts-common.c (add_misspelling_candidates): Add "option" param;
use it to avoid adding negated forms for options marked with
RejectNegative.
* opts.h (add_misspelling_candidates): Add "option" param.

gcc/testsuite/ChangeLog:
PR driver/71651
* gcc.dg/spellcheck-options-12.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237880 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gcc.c
gcc/opts-common.c
gcc/opts.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/spellcheck-options-12.c [new file with mode: 0644]