C, properly error on keywords as function parameters

This commit is contained in:
Jakob Lykke Andersen
2020-10-11 13:57:04 +02:00
parent 3f4a58b5b4
commit 17337a3257
3 changed files with 8 additions and 0 deletions

View File

@@ -417,6 +417,9 @@ def test_function_definitions():
check('function', 'void f(int arr[const static volatile 42])', {1: 'f'},
output='void f(int arr[static volatile const 42])')
with pytest.raises(DefinitionError):
parse('function', 'void f(int for)')
def test_nested_name():
check('struct', '{key}.A', {1: "A"})