From 603107fbb0da3acb1ce296dfef1a592a6451c0b4 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 30 Jun 2016 14:28:50 +0000 Subject: 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. From-SVN: r237880 --- gcc/opts.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/opts.h') diff --git a/gcc/opts.h b/gcc/opts.h index 1b5cf44..25d32c1 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -417,6 +417,7 @@ extern const struct sanitizer_opts_s } sanitizer_opts[]; extern void add_misspelling_candidates (auto_vec *candidates, + const struct cl_option *option, const char *base_option); #endif -- cgit v1.1