summaryrefslogtreecommitdiffstats
path: root/Tools/c-analyzer/c_parser
Commit message (Collapse)AuthorAgeFilesLines
* gh-90110: Fix the c-analyzer Tool (#102483)Eric Snow2023-03-073-17/+33
| | | | | | | Some incompatible changes had gone in, and the "ignore" lists weren't properly undated. This change fixes that. It's necessary prior to enabling test_check_c_globals, which I hope to do soon. Note that this does include moving last_resort_memory_error to PyInterpreterState. https://github.com/python/cpython/issues/90110
* gh-98401: Invalid escape sequences emits SyntaxWarning (#99011)Victor Stinner2022-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence), use raw strings for regular expression: re.compile(r"\d+\.\d+"). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. Octal escapes with value larger than 0o377 (ex: "\477"), deprecated in Python 3.11, now produce a SyntaxWarning, instead of DeprecationWarning. In a future Python version they will be eventually a SyntaxError. codecs.escape_decode() and codecs.unicode_escape_decode() are left unchanged: they still emit DeprecationWarning. * The parser only emits SyntaxWarning for Python 3.12 (feature version), and still emits DeprecationWarning on older Python versions. * Fix SyntaxWarning by using raw strings in Tools/c-analyzer/ and wasm_build.py.
* gh-90110: Fix the c-analyzer Tool (gh-96731)Eric Snow2022-09-125-37/+224
| | | | | | | This includes: * update the whitelists * fixes so we can stop ignoring some of the files * ensure Include/cpython/*.h get analyzed
* gh-90110: Update the c-analyzer Tool (gh-96255)Eric Snow2022-08-251-0/+1
| | | Here we automatically ignore uses of _PyArg_Parser, "kwlist" arrays, and module/type defs. That way new uses don't trigger false positives in the c-analyzer check script.
* gh-90110: Update the c-analyzer Tool (gh-96058)Eric Snow2022-08-172-4/+30
|
* gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650)Serhiy Storchaka2022-08-081-1/+1
|
* gh-85454: Remove distutils.ccompiler from Tools/c-analyzer (GH-95171)Dong-hee Na2022-07-251-2/+12
|
* Fix typos in comments (#94305)yutotnh2022-06-281-2/+2
|
* gh-81057: Fix indent. (gh-92267)Eric Snow2022-05-031-1/+1
|
* gh-81057: Get the c-analyzer tool working again. (gh-92246)Eric Snow2022-05-033-2/+11
|
* bpo-45952: Get the C analyzer tool working again. (gh-29882)Eric Snow2021-12-013-11/+39
| | | | | There wasn't much that needed to be done. Mostly it was just a few new files that got added. https://bugs.python.org/issue45952
* Fix typos in the Tools directory (GH-28769)Christian Clauss2021-10-063-8/+8
| | | | | | | Like #28744 but for the Tools directory. [skip issue] Opening a related issue is pending python/psf-infra-meta#130 Automerge-Triggered-By: GH:pablogsal
* bpo-44854: Remove trailing whitespaces (GH-27689)Serhiy Storchaka2021-08-092-2/+2
|
* Fix a typo in c-analyzer (GH-24468)Ikko Ashimine2021-03-191-1/+1
|
* bpo-36876: [c-analyzer tool] Add a "capi" subcommand to the c-analyzer tool. ↵Eric Snow2020-12-242-3/+5
| | | | | | | (gh-23918) This will help identify which C-API items will need to be updated for subinterpreter support. https://bugs.python.org/issue36876
* bpo-36876: [c-analyzer tool] Tighten up the results and output. (GH-23431)Eric Snow2020-11-203-23/+66
| | | We also update the "ignored" file with a temporary list of all known globals.
* bpo-36876: Small adjustments to the C-analyzer tool. (GH-23045)Eric Snow2020-10-306-133/+236
| | | This is a little bit of clean-up, small fixes, and additional helpers prior to building an updated & accurate list of globals to eliminate.
* bpo-36876: Fix the C analyzer tool. (GH-22841)Eric Snow2020-10-2321-0/+5204
| | | | | | | The original tool wasn't working right and it was simpler to create a new one, partially re-using some of the old code. At this point the tool runs properly on the master. (Try: ./python Tools/c-analyzer/c-analyzer.py analyze.) It take ~40 seconds on my machine to analyze the full CPython code base. Note that we'll need to iron out some OS-specific stuff (e.g. preprocessor). We're okay though since this tool isn't used yet in our workflow. We will also need to verify the analysis results in detail before activating the check in CI, though I'm pretty sure it's close. https://bugs.python.org/issue36876
* bpo-36876: Re-organize the c-analyzer tool code. (gh-16841)Eric Snow2019-10-196-1127/+0
| | | | | This is partly a cleanup of the code. It also is preparation for getting the variables from the source (cross-platform) rather than from the symbols. The change only touches the tool (and its tests).
* bpo-38187: Fix a refleak in Tools/c-analyzer. (gh-16304)Eric Snow2019-09-272-18/+43
| | | | | The "Slot" helper (descriptor) is leaking references due to its caching mechanism. The change includes a partial fix to Slot, but also adds Variable.storage to replace the problematic use of Slot. https://bugs.python.org/issue38187
* bpo-38187: Fix reference leak in test_tools (GH-16233)Pablo Galindo2019-09-171-0/+3
|
* bpo-36876: Add a tool that identifies unsupported global C variables. (#15877)Eric Snow2019-09-116-0/+1099