Skip to content

Commit

Permalink
gh-102737: Un-ignore ceval.c in the CI globals check (gh-102745)
Browse files Browse the repository at this point in the history
The tool now allows user-added #LINE preprocessor directives.

#102737
  • Loading branch information
ericsnowcurrently authored Mar 16, 2023
1 parent adaed17 commit 84e20c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 7 additions & 3 deletions Tools/c-analyzer/c_parser/preprocessor/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,13 @@ def _iter_top_include_lines(lines, topfile, cwd,
# XXX How can a file return to line 1?
#assert lno > 1, (line, lno)
else:
# It's the next line from the file.
assert included == files[-1], (line, files)
assert lno > 1, (line, lno)
if included == files[-1]:
# It's the next line from the file.
assert lno > 1, (line, lno)
else:
# We ran into a user-added #LINE directive,
# which we promptly ignore.
pass
elif not files:
raise NotImplementedError((line,))
elif filter_reqfile(files[-1]):
Expand Down
4 changes: 0 additions & 4 deletions Tools/c-analyzer/cpython/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ def clean_lines(text):
# has gone wrong where # we handle "maybe inline actual"
# in Tools/c-analyzer/c_parser/parser/_global.py.
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('''
Expand Down

0 comments on commit 84e20c6

Please sign in to comment.