mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
updates: insert/remove %empty
* src/reader.c (grammar_rule_check_and_complete): Generate fixits for adding/removing %empty. * tests/actions.at, tests/diagnostics.at, tests/existing.at: Adjust.
This commit is contained in:
@@ -134,6 +134,7 @@ AT_BISON_CHECK([-fcaret -Wempty-rule 1.y], [0], [],
|
||||
[[1.y:11.17-18: warning: empty rule without %empty [-Wempty-rule]
|
||||
11 | a: /* empty. */ {};
|
||||
| ^~
|
||||
1.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
|
||||
]])
|
||||
|
||||
AT_DATA_GRAMMAR([[2.y]],
|
||||
@@ -151,6 +152,7 @@ AT_BISON_CHECK([-fcaret 2.y], [0], [],
|
||||
2.y:13.17-18: warning: empty rule without %empty [-Wempty-rule]
|
||||
13 | c: /* empty. */ {};
|
||||
| ^~
|
||||
2.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-fcaret -Wno-empty-rule 2.y], [0])
|
||||
@@ -229,6 +231,7 @@ two.y:12.3-8: error: %empty on non-empty rule
|
||||
two.y:13.3-8: error: %empty on non-empty rule
|
||||
13 | | %empty {} {}
|
||||
| ^~~~~~
|
||||
two.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
|
||||
]])
|
||||
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
Reference in New Issue
Block a user