gh-102737: Un-ignore ceval.c in the CI globals check (gh-102745)

The tool now allows user-added #LINE preprocessor directives.

https://github.com/python/cpython/issues/102737
This commit is contained in:
Eric Snow 2023-03-16 09:26:42 -06:00 committed by GitHub
parent adaed17341
commit 84e20c689a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -153,9 +153,13 @@ def _iter_top_include_lines(lines, topfile, cwd,
# XXX How can a file return to line 1? # XXX How can a file return to line 1?
#assert lno > 1, (line, lno) #assert lno > 1, (line, lno)
else: else:
# It's the next line from the file. if included == files[-1]:
assert included == files[-1], (line, files) # It's the next line from the file.
assert lno > 1, (line, lno) assert lno > 1, (line, lno)
else:
# We ran into a user-added #LINE directive,
# which we promptly ignore.
pass
elif not files: elif not files:
raise NotImplementedError((line,)) raise NotImplementedError((line,))
elif filter_reqfile(files[-1]): elif filter_reqfile(files[-1]):

View file

@ -96,10 +96,6 @@ EXCLUDED += clean_lines('''
# has gone wrong where # we handle "maybe inline actual" # has gone wrong where # we handle "maybe inline actual"
# in Tools/c-analyzer/c_parser/parser/_global.py. # in Tools/c-analyzer/c_parser/parser/_global.py.
Modules/expat/xmlparse.c Modules/expat/xmlparse.c
# The parser doesn't like the #line directives
# that originate from generated_cases.c.h
Python/ceval.c
''') ''')
INCL_DIRS = clean_lines(''' INCL_DIRS = clean_lines('''