summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2021-09-20 06:26:00 -0700
committerEli Bendersky <eliben@gmail.com>2021-09-20 06:26:00 -0700
commit14539f947b2c0c3c0c150ddb04e37f5ac645b59e (patch)
treed62beb8edcb10abbd8e7f78e1d18bb5a455c3c6b
parent77cb1fcda28965de518051d3db752b2dbbe4bf4a (diff)
downloadpycparser-14539f947b2c0c3c0c150ddb04e37f5ac645b59e.tar.gz
Clean up some comments
-rw-r--r--pycparser/c_parser.py4
-rw-r--r--tests/test_c_generator.py6
2 files changed, 3 insertions, 7 deletions
diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py
index 0f026eb..f9528f8 100644
--- a/pycparser/c_parser.py
+++ b/pycparser/c_parser.py
@@ -779,8 +779,8 @@ class CParser(PLYParser):
"""
p[0] = self._add_declaration_specifier(p[2], p[1], 'function')
- # This is a bit ugly, but we need to process atomic specifier before qualifiers
- # for _Atomic(x) in typedefs.
+ # Withot this, `typedef _Atomic(T) U` will parse incorrectly because the
+ # _Atomic qualifier will match, instead of the specifier.
def p_declaration_specifiers_no_type_4(self, p):
""" declaration_specifiers_no_type : atomic_specifier declaration_specifiers_no_type_opt
"""
diff --git a/tests/test_c_generator.py b/tests/test_c_generator.py
index bcbdfcc..fb9499a 100644
--- a/tests/test_c_generator.py
+++ b/tests/test_c_generator.py
@@ -368,10 +368,6 @@ class TestCtoC(unittest.TestCase):
'const int')
def test_atomic_qual(self):
- #s = '_Atomic(_Atomic(int)*) x;'
- #ast = parse_to_ast(s)
- #print(c_generator.CGenerator().visit(ast))
-
self._assert_ctoc_correct('_Atomic int x;')
self._assert_ctoc_correct('_Atomic int* x;')
self._assert_ctoc_correct('int* _Atomic x;')
@@ -392,7 +388,7 @@ class TestCtoC(unittest.TestCase):
self.assertEqual(c3, '_Atomic int * _Atomic x;\n')
self._assert_ctoc_correct(s3)
- # FIXME: Regeneration with multiple qualifiers is not fully supported.
+ # TODO: Regeneration with multiple qualifiers is not fully supported.
# REF: https://github.com/eliben/pycparser/issues/433
# self._assert_ctoc_correct('auto const _Atomic(int *) a;')