Showing preview only (5,048K chars total). Download the full file or copy to clipboard to get everything.
Repository: davidmalcolm/gcc-python-plugin
Branch: master
Commit: 4deefc840e69
Files: 1385
Total size: 40.4 MB
Directory structure:
gitextract_vqz28poh/
├── .gitignore
├── .travis.yml
├── COPYING
├── LICENSES.txt
├── Makefile
├── README.rst
├── configbuilder.py
├── contributors.rst
├── cpybuilder.py
├── cpychecker.py
├── dejagnu.py
├── demo.c
├── demo.expected
├── demo.expected.no-refcounts
├── docs/
│ ├── 0.10.rst
│ ├── 0.11.rst
│ ├── 0.12.rst
│ ├── 0.13.rst
│ ├── 0.14.rst
│ ├── 0.15.rst
│ ├── 0.16.rst
│ ├── 0.17.rst
│ ├── 0.7.rst
│ ├── 0.8.rst
│ ├── 0.9.rst
│ ├── Makefile
│ ├── appendices.rst
│ ├── attributes.rst
│ ├── basics.rst
│ ├── callbacks.rst
│ ├── callgraph.rst
│ ├── cfg.rst
│ ├── conf.py
│ ├── cpychecker.rst
│ ├── diagnostics.rst
│ ├── examples.rst
│ ├── gcc-overview.rst
│ ├── gcc-with-python.rst
│ ├── getting-involved.rst
│ ├── gimple.rst
│ ├── index.rst
│ ├── locations.rst
│ ├── lto.rst
│ ├── misc.rst
│ ├── operators.rst
│ ├── options.rst
│ ├── parameters.rst
│ ├── passes.rst
│ ├── preprocessor.rst
│ ├── release-notes.rst
│ ├── rtl.rst
│ ├── success.rst
│ ├── tables-of-passes.rst
│ ├── tree.rst
│ ├── versions.rst
│ └── working-with-c.rst
├── examples/
│ ├── show-callgraph.py
│ ├── show-docs.py
│ ├── show-gimple.py
│ ├── show-lto-supergraph.py
│ ├── show-passes.py
│ └── show-ssa.py
├── gcc-c-api/
│ ├── Makefile
│ ├── api.rng
│ ├── callgraph.xml
│ ├── cfg.xml
│ ├── constant.xml
│ ├── declaration.xml
│ ├── design.rst
│ ├── diagnostics.xml
│ ├── function.xml
│ ├── gcc-callgraph.c
│ ├── gcc-cfg.c
│ ├── gcc-common.h
│ ├── gcc-constant.c
│ ├── gcc-declaration.c
│ ├── gcc-diagnostics.c
│ ├── gcc-function.c
│ ├── gcc-gimple.c
│ ├── gcc-internal.h
│ ├── gcc-location.c
│ ├── gcc-option.c
│ ├── gcc-private-compat.h
│ ├── gcc-rtl.c
│ ├── gcc-tree.c
│ ├── gcc-type.c
│ ├── gcc-variable.c
│ ├── generate-casts-c.py
│ ├── gimple.xml
│ ├── location.xml
│ ├── option.xml
│ ├── rtl.xml
│ ├── tree.xml
│ ├── type.xml
│ ├── variable.xml
│ ├── xml-to-h.py
│ └── xmltypes.py
├── gcc-python-attribute.c
├── gcc-python-callbacks.c
├── gcc-python-callgraph.c
├── gcc-python-cfg.c
├── gcc-python-closure.c
├── gcc-python-closure.h
├── gcc-python-compat.h
├── gcc-python-diagnostics.c
├── gcc-python-docs
├── gcc-python-function.c
├── gcc-python-gimple.c
├── gcc-python-location.c
├── gcc-python-option.c
├── gcc-python-parameter.c
├── gcc-python-pass.c
├── gcc-python-plugin.spec
├── gcc-python-pretty-printer.c
├── gcc-python-rtl.c
├── gcc-python-tree.c
├── gcc-python-variable.c
├── gcc-python-version.c
├── gcc-python-wrapper.c
├── gcc-python-wrappers.h
├── gcc-python.c
├── gcc-python.h
├── gcc-with-cpychecker
├── gcc-with-python
├── gccutils/
│ ├── __init__.py
│ ├── dot.py
│ ├── graph/
│ │ ├── __init__.py
│ │ ├── ivpgraph.py
│ │ ├── query.py
│ │ ├── stmtgraph.py
│ │ └── supergraph.py
│ └── selftests.py
├── generate-callgraph-c.py
├── generate-casts-c.py
├── generate-cfg-c.py
├── generate-config-h.py
├── generate-function-c.py
├── generate-gimple-c.py
├── generate-location-c.py
├── generate-option-c.py
├── generate-parameter-c.py
├── generate-pass-c.py
├── generate-passes-svg.py
├── generate-pretty-printer-c.py
├── generate-rtl-c.py
├── generate-tables-of-passes-rst.py
├── generate-tree-c.py
├── generate-variable-c.py
├── gimple-types.txt.in
├── libcpychecker/
│ ├── PyArg_ParseTuple.py
│ ├── Py_BuildValue.py
│ ├── __init__.py
│ ├── absinterp.py
│ ├── attributes.py
│ ├── c_stdio.py
│ ├── compat.py
│ ├── diagnostics.py
│ ├── formatstrings.py
│ ├── initializers.py
│ ├── refcounts.py
│ ├── types.py
│ ├── utils.py
│ └── visualizations.py
├── libcpychecker_html/
│ ├── TODO
│ ├── __init__.py
│ ├── c-api.txt
│ ├── capi.py
│ ├── foo.html
│ ├── html_to_lxml.py
│ ├── json.rst
│ ├── make_html.py
│ ├── script.js
│ ├── style-noprefix.css
│ ├── style.css
│ └── test/
│ ├── example1/
│ │ ├── bug.c
│ │ └── bug.c.make_a_list_of_random_ints_badly.json
│ ├── example2/
│ │ ├── _pylibmcmodule.h
│ │ ├── pylibmc-issue-68.c
│ │ └── pylibmc-issue-68.c.PylibMC_Client_get_multi.json
│ └── example3/
│ ├── _mysql.c
│ └── _mysql.c.init_mysql.json
├── maketreetypes.py
├── misc/
│ └── fedora/
│ ├── bugreporting.py
│ ├── bugreports.txt
│ ├── fake-g++.py
│ ├── fake-gcc.py
│ ├── get-srpms.py
│ ├── makeindex.py
│ └── mass-rebuild.py
├── print-gcc-version.c
├── rtl-types.txt.in
├── run-test-suite.py
├── test-builder.py
├── test.c
├── test.py
├── testcpybuilder.py
├── testcpychecker.py
├── tests/
│ ├── cpychecker/
│ │ ├── PyArg_Parse/
│ │ │ └── incorrect_codes_S_and_U/
│ │ │ ├── input.c
│ │ │ ├── metadata.ini
│ │ │ ├── script.py
│ │ │ └── stderr.txt
│ │ ├── PyArg_ParseTuple/
│ │ │ ├── code_O_bang/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ └── stderr.txt
│ │ │ ├── code_s/
│ │ │ │ └── incorrect-constness/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ └── stderr.txt
│ │ │ ├── codes_accepting_null/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── correct_codes_S_and_U/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── correct_converter/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── encodings/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── hash_format_codes.inc
│ │ │ ├── incorrect_code_z_hash/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ └── stderr.txt
│ │ │ ├── incorrect_codes_S_and_U/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ └── stderr.txt
│ │ │ ├── incorrect_converters/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ └── stderr.txt
│ │ │ ├── keywords/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ └── stderr.txt
│ │ │ ├── typedefs/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── with_PY_SSIZE_T_CLEAN/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ └── stderr.txt
│ │ │ └── without_PY_SSIZE_T_CLEAN/
│ │ │ ├── input.c
│ │ │ ├── metadata.ini
│ │ │ ├── script.py
│ │ │ └── stderr.txt
│ │ ├── PyMethodDef/
│ │ │ ├── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── incorrect-types/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ └── missing-sentinel/
│ │ │ ├── input.c
│ │ │ ├── metadata.ini
│ │ │ ├── script.py
│ │ │ ├── stderr.txt
│ │ │ └── stdout.txt
│ │ ├── Py_BuildValue/
│ │ │ ├── code_O/
│ │ │ │ └── subclass/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── code_c/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── code_f/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── code_lower_d/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── code_s_hash/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── code_u/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── code_u_hash/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ └── code_upper_D/
│ │ │ ├── correct/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ └── incorrect/
│ │ │ ├── input.c
│ │ │ ├── metadata.ini
│ │ │ ├── script.py
│ │ │ └── stderr.txt
│ │ ├── absinterp/
│ │ │ ├── arithmetic/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── division-by-zero/
│ │ │ │ │ ├── definite/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── metadata.ini
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ ├── stderr.txt
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ └── possible/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── fix-trunc-expr/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── negative-shift/
│ │ │ │ ├── definite/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── possible/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── array-range/
│ │ │ │ ├── fully-checked/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── fully-checked-on-stack/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── implicitly-correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── off-by-one/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── partial-initialization-on-stack/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── unchecked/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── upper-checked/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── arrays/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── arrays2/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── arrays3/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── arrays4/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── arrays5/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── arrays6/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── arrays7/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── asm/
│ │ │ │ └── empty/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── assignment-from-string-const/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── bitfields/
│ │ │ │ └── reading/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── casts/
│ │ │ │ ├── int-to-char-with-extraction/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── int-to-char-with-implicit-truncation/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── int-to-char-within-range/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── int-to-float/
│ │ │ │ │ ├── input.c
│ │ │ │ │ └── script.py
│ │ │ │ ├── int-to-pointer/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ └── script.py
│ │ │ │ ├── int-to-pointer2/
│ │ │ │ │ ├── input.c
│ │ │ │ │ └── script.py
│ │ │ │ ├── pointer-to-long/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── pyobjectptr-to-long/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── comparisons/
│ │ │ │ ├── boundaries/
│ │ │ │ │ ├── ConcreteValue-eq-max-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-eq-min-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-ge-max-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-ge-min-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-gt-max-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-gt-min-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-le-max-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-le-min-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-lt-max-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-lt-min-of-WithinRange/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── ConcreteValue-lt-two-value-range/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ └── WithinRange-eq-ConcreteValue-in-middle/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── conditionals/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── expressions/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── pointers/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── custom-strdup/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── custom-strdup-with-attr/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── exceptions/
│ │ │ │ ├── getopts.py
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── exit/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── function-pointers/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── nested-fields/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── nested-fields2/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── nested-fields3/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── nonnull-attribute/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── read-through-global-ptr-checked/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── read-through-global-ptr-unchecked/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── read-through-uninitialized-ptr/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── real-cst/
│ │ │ │ └── regular/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── result-decl/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── static-data/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── string-constants/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── switch/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── two-loops/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── uninitialized-data/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── void-return/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── write-through-arg-unchecked/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── write-through-global-ptr-checked/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ └── write-through-global-ptr-unchecked/
│ │ │ ├── input.c
│ │ │ ├── metadata.ini
│ │ │ ├── script.py
│ │ │ ├── stderr.txt
│ │ │ └── stdout.txt
│ │ ├── fileptr-missing-error-check/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stderr.txt
│ │ ├── refcounts/
│ │ │ ├── GIL/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyArg_Parse/
│ │ │ │ └── correct_simple/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyArg_ParseTuple/
│ │ │ │ ├── correct_O/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct_O_bang/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct_converter/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── correct_simple/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyArg_ParseTupleAndKeywords/
│ │ │ │ └── correct_O/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyArg_UnpackTuple/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── missing-initialization/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── wrong-number-of-varargs/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyBool_FromLong/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyCObject_FromVoidPtr/
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyCObject_FromVoidPtrAndDesc/
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyCapsule_GetPointer/
│ │ │ │ └── basic/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyDict_GetItem/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyDict_GetItemString/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyDict_New/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyDict_SetItem/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyDict_SetItemString/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyDict_Size/
│ │ │ │ └── simple/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_Clear/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_Format/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_NewException/
│ │ │ │ └── basic/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_NoMemory/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_PrintEx/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_SetFromErrno/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_SetNone/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_SetObject/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyErr_SetString/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyEval_CallMethod/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyFloat_AsDouble/
│ │ │ │ ├── correct_PyFloatObject/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── correct_cast/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyFloat_FromDouble/
│ │ │ │ └── simple/
│ │ │ │ ├── #input.c#
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyGILState_Ensure/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyInt_AsLong/
│ │ │ │ ├── correct_PyIntObject/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── correct_cast/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyInt_FromLong/
│ │ │ │ ├── correct_large_int/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── correct_small_int/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyIter_Next/
│ │ │ │ └── simple/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyList_Append/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── incorrect/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── incorrect-loop/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── null-newitem/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── ticket-19/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── ticket-22/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyList_GetItem/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyList_SET_ITEM_macro/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct_multiple/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect_multiple/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyList_Size/
│ │ │ │ ├── known-size/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── unknown-size/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyMapping_Size/
│ │ │ │ └── basic/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyMem_Malloc/
│ │ │ │ └── correct/
│ │ │ │ ├── alloc-and-free/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── free-NULL/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyModule_AddObject/
│ │ │ │ └── incorrect-with-cast/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_CallFunction/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_CallFunctionObjArgs/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_CallMethod/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── correct-code-N/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_CallMethodObjArgs/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_CallObject/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_GenericGetAttr/
│ │ │ │ └── basic/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_GenericSetAttr/
│ │ │ │ └── basic/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_GetAttr/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_GetAttrString/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_GetItem/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_HasAttrString/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_IsTrue/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyObject_SetAttrString/
│ │ │ │ └── ignored-lhs/
│ │ │ │ ├── input.c
│ │ │ │ └── script.py
│ │ │ ├── PySequence_SetItem/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PySequence_Size/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── null/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyString_AsString/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── incorrect/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── unknown/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyString_Concat/
│ │ │ │ ├── basic/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── leak-of-rhs/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── null-lhs/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── null-rhs/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyString_ConcatAndDel/
│ │ │ │ ├── basic/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── null-lhs/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── null-rhs/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyString_FromStringAndSize/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyString_Size/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyStructSequence/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PySys_GetObject/
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PySys_SetObject/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyTuple_GetItem/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyTuple_New/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyTuple_Pack/
│ │ │ │ └── incorrect-arg-count/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyTuple_SET_ITEM_macro/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct_multiple/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect_multiple/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyTuple_SetItem/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct_multiple/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect_multiple/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── PyTuple_Size/
│ │ │ │ ├── incorrect/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── ticket-24/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyType_IsSubtype/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyUnicode_AsUTF8String/
│ │ │ │ └── basic/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── PyWeakref_GetObject/
│ │ │ │ ├── NULL/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── Py_BuildValue/
│ │ │ │ ├── Py_TYPE/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct-code-N/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct-code-O/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── correct-code-s/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── Py_FatalError/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── Py_Finalize/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── SWIG_Python_ErrorType/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── SWIG_Python_SetErrorMsg/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── _PyObject_New/
│ │ │ │ └── correct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── __builtin_expect/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── attributes/
│ │ │ │ ├── returns-borrowed-ref/
│ │ │ │ │ ├── correct-marking/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── correct-usage/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── incorrect-marking/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── metadata.ini
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ ├── stderr.txt
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ └── incorrect-usage/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── sets-exception/
│ │ │ │ │ ├── correct-marking/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── correct-usage/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ └── incorrect-marking/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── sets-exception-on-nonzero-return/
│ │ │ │ │ ├── correct-marking/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ ├── correct-usage/
│ │ │ │ │ │ ├── input.c
│ │ │ │ │ │ ├── script.py
│ │ │ │ │ │ └── stdout.txt
│ │ │ │ │ └── incorrect-marking/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── steals-reference-to-arg/
│ │ │ │ ├── correct-marking/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── correct-usage/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── incorrect-marking/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect-usage/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── combinatorial-explosion/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── combinatorial-explosion-with-error/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── correct_decref/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── correct_object_ctor/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── correct_py_none/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── cplusplus/
│ │ │ │ ├── destructor/
│ │ │ │ │ ├── input.cc
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── empty-function/
│ │ │ │ │ ├── input.cc
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── method/
│ │ │ │ │ ├── input.cc
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── reference/
│ │ │ │ │ ├── input.cc
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── simple/
│ │ │ │ │ ├── input.cc
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── this/
│ │ │ │ ├── input.cc
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── fold_conditional/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── function-that-exits/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── getter/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── handle_null_error/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── incorrect_py_none/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── json/
│ │ │ │ └── basic/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── loop_n_times/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── loops/
│ │ │ │ ├── complex-loop-conditional-1/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── complex-loop-conditional-2/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── macros/
│ │ │ │ └── Py_XDECREF/
│ │ │ │ └── crash/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── missing_decref/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── module_handling/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── multiple-returns/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── not_setting_exception/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── object_from_callback/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── object_leak/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── passing_dead_object/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── returning_dead_object/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── storage_regions/
│ │ │ │ └── static/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── incorrect/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── subclass/
│ │ │ │ ├── detection/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── handling/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ ├── incorrect-subclass-ptr/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── opaque-struct/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── ticket-20/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── too_many_increfs/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── tp_iternext/
│ │ │ │ ├── correct/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── script.py
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── partial-type-object/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── uninitialized_data/
│ │ │ │ ├── comparison/
│ │ │ │ │ ├── input.c
│ │ │ │ │ ├── metadata.ini
│ │ │ │ │ ├── script.py
│ │ │ │ │ ├── stderr.txt
│ │ │ │ │ └── stdout.txt
│ │ │ │ └── function_arg/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── unrecognized_function/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── unrecognized_function2/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── unrecognized_function3/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ ├── unrecognized_function4/
│ │ │ │ ├── input.c
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ ├── use_after_dealloc/
│ │ │ │ ├── input.c
│ │ │ │ ├── metadata.ini
│ │ │ │ ├── script.py
│ │ │ │ ├── stderr.txt
│ │ │ │ └── stdout.txt
│ │ │ └── without-python-headers/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ └── unknown-function/
│ │ ├── input.c
│ │ └── script.py
│ ├── examples/
│ │ ├── attributes/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── attributes-with-macros/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── c/
│ │ │ └── struct/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── cplusplus/
│ │ │ ├── classes/
│ │ │ │ ├── input.cc
│ │ │ │ ├── script.py
│ │ │ │ └── stdout.txt
│ │ │ └── methods/
│ │ │ ├── getopts.py
│ │ │ ├── input.cc
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── find-global-state/
│ │ │ ├── input.c
│ │ │ ├── metadata.ini
│ │ │ ├── script.py
│ │ │ └── stderr.txt
│ │ ├── hello-world/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── lto/
│ │ │ ├── input-f.c
│ │ │ ├── input-g.c
│ │ │ ├── input-main.c
│ │ │ ├── script.py
│ │ │ └── test.h
│ │ └── spelling-checker/
│ │ ├── input.c
│ │ ├── metadata.ini
│ │ ├── script.py
│ │ ├── stderr.txt
│ │ └── stdout.txt
│ ├── gccutils/
│ │ ├── graph/
│ │ │ ├── input.c
│ │ │ ├── metadata.ini
│ │ │ ├── script.py
│ │ │ └── stderr.txt
│ │ └── topological-sort/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ └── plugin/
│ ├── array-type/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── arrays/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── attributes/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── callback-FINISH_DECL/
│ │ ├── input.c
│ │ ├── metadata.ini
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── callbacks/
│ │ ├── PLUGIN_FINISH/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── args/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── exception/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stderr.txt
│ │ └── refs/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── callgraph/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── compound-locations/
│ │ ├── input.c
│ │ └── script.py
│ ├── constants/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── diagnostics/
│ │ ├── getopts.py
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stderr.txt
│ ├── dumpfiles/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── enum-type/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── expressions/
│ │ └── get_symbol/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── function-types/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── functions/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── gc/
│ │ ├── _force_garbage_collection/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── _gc_selftest/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ └── segfault-on-instance-of-pass-subclass/
│ │ ├── input.c
│ │ └── script.py
│ ├── gimple-asm/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── gimple-cond/
│ │ ├── explicit-comparison/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ └── implicit-comparison/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── gimple-walk-tree/
│ │ ├── dump-all/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ ├── exceptions/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ ├── stderr.txt
│ │ │ └── stdout.txt
│ │ └── find-one/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── identifiers/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── initializers/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── language-specific-errors/
│ │ └── fullname/
│ │ ├── input.c
│ │ ├── script.py
│ │ ├── stderr.txt
│ │ └── stdout.txt
│ ├── macros/
│ │ ├── correct/
│ │ │ ├── input.c
│ │ │ ├── script.py
│ │ │ └── stdout.txt
│ │ └── too-early/
│ │ ├── input.c
│ │ ├── script.py
│ │ ├── stderr.txt
│ │ └── stdout.txt
│ ├── namespace/
│ │ ├── input.cc
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── new-passes/
│ │ ├── input.c
│ │ ├── script.py
│ │ ├── stderr.txt
│ │ └── stdout.txt
│ ├── options/
│ │ ├── getopts.py
│ │ ├── input.c
│ │ ├── script.py
│ │ ├── stderr.txt
│ │ └── stdout.txt
│ ├── parameters/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── rich-location/
│ │ ├── input.c
│ │ └── script.py
│ ├── rtl/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── switch/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── syntax-error/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stderr.txt
│ ├── sys/
│ │ ├── input.c
│ │ └── script.py
│ ├── translation-units/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── type-attributes/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ ├── types/
│ │ ├── input.c
│ │ ├── script.py
│ │ └── stdout.txt
│ └── version/
│ ├── input.c
│ ├── script.py
│ └── stdout.txt
├── tree-types.txt.in
└── wrapperbuilder.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*~
.*.sw[a-z]
*.o
*.so
a.out
*.pyc
test.png
# Generated during configuration:
config-tests
# Generated elsewhere in build:
autogenerated*
gcc-c-api/gcc-public-types.h
gcc-c-api/gcc-semiprivate-types.h
gcc-c-api/gcc-callgraph.h
gcc-c-api/gcc-cfg.h
gcc-c-api/gcc-constant.h
gcc-c-api/gcc-declaration.h
gcc-c-api/gcc-diagnostics.h
gcc-c-api/gcc-function.h
gcc-c-api/gcc-gimple.h
gcc-c-api/gcc-location.h
gcc-c-api/gcc-option.h
gcc-c-api/gcc-rtl.h
gcc-c-api/gcc-tree.h
gcc-c-api/gcc-type.h
gcc-c-api/gcc-variable.h
gcc-with-python.1.gz
print-gcc-version
# Generated by Sphinx
docs/_build
# Logfiles generated during the selftest suite:
*.c.cpychecker-log.txt
*.*-refcount-errors.html
*.*-refcount-errors.v2.html
*.*-refcount-traces.html
tests/plugin/dumpfiles/input.c.*t.test-pass
pygments_c.css
================================================
FILE: .travis.yml
================================================
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8 gcc-4.8-plugin-dev
env:
- MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8"
# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9 gcc-4.9-plugin-dev
env:
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5 gcc-5-plugin-dev
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6 gcc-6-plugin-dev
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7 gcc-7-plugin-dev
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8 gcc-8-plugin-dev
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9 gcc-9-plugin-dev
env:
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
language: c
compiler:
- gcc
before_install:
- eval "${MATRIX_EVAL}"
- sudo apt-get update -qq
- sudo apt-get install -qq python-six python-pygments graphviz python-lxml
script:
- pwd=$(pwd -P)
- mkdir build
- cd build
- make -f $pwd/Makefile srcdir=$pwd/
================================================
FILE: COPYING
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: LICENSES.txt
================================================
The C and Python code is licensed under the GPLv3 or later (see COPYING and the
per-file license information).
There are copies of various JavaScript and CSS libraries embedded within the
source tree, which have their own licenses as follows:
libcpychecker_html/extlib/jquery-1.7.1.min.js:
jquery.org/license (MIT or GPLv2)
libcpychecker_html/extlib/prefixfree-1.0.4.min.js:
MIT license
libcpychecker_html/extlib/reset-20110126.css:
Public Domain
There are also various images within:
libcpychecke_/html/images
These were taken from:
http://code.google.com/p/fugue-icons-src/
and are:
"© 2012 Yusuke Kamiyamane. All rights reserved.
These icons are available under a Creative Commons Attribution 3.0
License. "
http://creativecommons.org/licenses/by/3.0/
The test code contains historical examples of reference-count bugs:
* libcpychecker_html/test/example2
contains an embedded copy of part of an old version of pylibmc, which
is under a 3-clause BSD license
================================================
FILE: Makefile
================================================
# Copyright 2011-2013, 2017 David Malcolm <dmalcolm@redhat.com>
# Copyright 2011-2013, 2017 Red Hat, Inc.
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
ifneq ($(srcdir),)
VPATH = $(srcdir)
endif
xmldir = $(srcdir)./gcc-c-api/
pwd = $(shell pwd -P)
.PHONY: all clean debug dump_gimple plugin show-ssa tarball \
test-suite testcpychecker testcpybuilder testdejagnu \
man
PLUGIN_SOURCE_FILES= \
gcc-python.c \
gcc-python-attribute.c \
gcc-python-callbacks.c \
gcc-python-callgraph.c \
gcc-python-cfg.c \
gcc-python-closure.c \
gcc-python-diagnostics.c \
gcc-python-function.c \
gcc-python-gimple.c \
gcc-python-location.c \
gcc-python-option.c \
gcc-python-parameter.c \
gcc-python-pass.c \
gcc-python-pretty-printer.c \
gcc-python-rtl.c \
gcc-python-tree.c \
gcc-python-variable.c \
gcc-python-version.c \
gcc-python-wrapper.c \
PLUGIN_GENERATED_SOURCE_FILES:= \
autogenerated-callgraph.c \
autogenerated-casts.c \
autogenerated-cfg.c \
autogenerated-option.c \
autogenerated-function.c \
autogenerated-gimple.c \
autogenerated-location.c \
autogenerated-parameter.c \
autogenerated-pass.c \
autogenerated-pretty-printer.c \
autogenerated-rtl.c \
autogenerated-tree.c \
autogenerated-variable.c
PLUGIN_OBJECT_SOURCE_FILES:= $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
PLUGIN_OBJECT_GENERATED_FILES:= $(patsubst %.c,%.o,$(PLUGIN_GENERATED_SOURCE_FILES))
PLUGIN_OBJECT_FILES:= $(PLUGIN_OBJECT_SOURCE_FILES) $(PLUGIN_OBJECT_GENERATED_FILES)
GCCPLUGINS_DIR:= $(shell $(CC) --print-file-name=plugin)
GENERATOR_DEPS=cpybuilder.py wrapperbuilder.py print-gcc-version
# The plugin supports both Python 2 and Python 3
#
# In theory we could have arbitrary combinations of python versions for each
# of:
# - python version used when running scripts during the build (e.g. to
# generate code)
# - python version we compile and link the plugin against
# - when running the plugin with the cpychecker script, the python version
# that the code is being compiled against
#
# However, to keep things simple, let's assume for now that all of these are
# the same version: we're building the plugin using the same version of Python
# as we're linking against, and that the cpychecker will be testing that same
# version of Python
#
# By default, build against "python", using "python-config" to query for
# compilation options. You can override this by passing other values for
# PYTHON and PYTHON_CONFIG when invoking "make" (or by simply hacking up this
# file): e.g.
# make PYTHON=python3 PYTHON_CONFIG=python3-config all
# The python interpreter to use:
PYTHON=python
# The python-config executable to use:
PYTHON_CONFIG=python-config
#PYTHON=python3
#PYTHON_CONFIG=python3-config
#PYTHON=python-debug
#PYTHON_CONFIG=python-debug-config
#PYTHON=python3-debug
#PYTHON_CONFIG=python3.3dm-config
PYTHON_INCLUDES=$(shell $(PYTHON_CONFIG) --includes)
PYTHON_LIBS=$(shell $(PYTHON) -c 'import sys;print("-lpython%d.%d" % sys.version_info[:2])') $(shell $(PYTHON_CONFIG) --libs)
# Support having multiple named plugins
# e.g. "python2.7" "python3.2mu" "python 3.2dmu" etc:
PLUGIN_NAME := python
PLUGIN_DSO := $(PLUGIN_NAME).so
PLUGIN_DIR := $(PLUGIN_NAME)
# For now, gcc-c-api is part of this project
# (Eventually it will be moved to its own project)
LIBGCC_C_API_SO := gcc-c-api/libgcc-c-api.so
CPPFLAGS+= -I$(GCCPLUGINS_DIR)/include -I$(GCCPLUGINS_DIR)/include/c-family -I. $(PYTHON_INCLUDES)
# Allow user to pick optimization, choose whether warnings are fatal,
# and choose debugging information level.
CFLAGS?=-O2 -Werror -g
# Force these settings
CFLAGS+= -fPIC -fno-strict-aliasing -Wall
LIBS+= $(PYTHON_LIBS)
ifneq "$(PLUGIN_PYTHONPATH)" ""
CPPFLAGS+= -DPLUGIN_PYTHONPATH='"$(PLUGIN_PYTHONPATH)"'
endif
all: autogenerated-config.h testcpybuilder testdejagnu test-suite testcpychecker
# What still needs to be wrapped?
api-report:
grep -nH -e "\.inner" gcc-*.c *.h generate-*.py
plugin: autogenerated-config.h $(PLUGIN_DSO)
# When running the plugin from a working copy, use LD_LIBARY_PATH=gcc-c-api
# so that the plugin can find its libgcc-c-api.so there
#
INVOCATION_ENV_VARS := PYTHONPATH=$(srcdir)./ CC_FOR_CPYCHECKER=$(CC) LD_LIBRARY_PATH=gcc-c-api:$(LD_LIBRARY_PATH) CC=$(CC)
# When installing, both the plugin and libgcc-c-api.so will be installed to
# $(GCCPLUGINS_DIR), so we give the plugin an RPATH of $(GCCPLUGINS_DIR)
# so that it finds the libgcc-c-api.so there (to support the case of having
# multiple GCCs installed)
#
$(PLUGIN_DSO): $(PLUGIN_OBJECT_FILES) $(LIBGCC_C_API_SO)
$(CC) \
$(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
-shared \
$(PLUGIN_OBJECT_FILES) \
-o $@ \
$(LIBS) \
-lgcc-c-api -Lgcc-c-api -Wl,-rpath=$(GCCPLUGINS_DIR)
$(pwd)/gcc-c-api:
mkdir -p $@
$(LIBGCC_C_API_SO): $(pwd)/gcc-c-api
cd gcc-c-api && make $(if $(srcdir),-f $(srcdir)./gcc-c-api/Makefile) libgcc-c-api.so CC=$(CC) $(if $(srcdir),srcdir=$(srcdir)./gcc-c-api/)
$(PLUGIN_OBJECT_GENERATED_FILES): CPPFLAGS+= $(if $(srcdir),-I$(srcdir))
# This is the standard .c->.o recipe, but it needs to be stated
# explicitly to support the case that $(srcdir) is not blank.
$(PLUGIN_OBJECT_FILES): %.o: %.c autogenerated-config.h gcc-python.h $(LIBGCC_C_API_SO) autogenerated-EXTRA_CFLAGS.txt
$(COMPILE.c) $(shell cat autogenerated-EXTRA_CFLAGS.txt) $(OUTPUT_OPTION) -I$(srcdir)./ -I$(srcdir)./gcc-c-api -I./gcc-c-api $<
print-gcc-version: print-gcc-version.c autogenerated-EXTRA_CFLAGS.txt
$(CC) \
$(CPPFLAGS) $(CFLAGS) \
$(shell cat autogenerated-EXTRA_CFLAGS.txt) \
-o $@ \
$<
clean:
$(RM) *.so *.o gcc-c-api/*.o autogenerated*
$(RM) -r docs/_build
$(RM) -f gcc-with-$(PLUGIN_NAME).1 gcc-with-$(PLUGIN_NAME).1.gz
$(RM) -f print-gcc-version
cd gcc-c-api && make clean
find tests -name "*.o" -delete
autogenerated-config.h: generate-config-h.py configbuilder.py
$(PYTHON) $< -o $@ --gcc="$(CC)" --plugindir="$(GCCPLUGINS_DIR)"
autogenerated-%.txt: %.txt.in
$(CPP) $(CPPFLAGS) -x c-header $^ -o $@
# autogenerated-EXTRA_CFLAGS.txt is a byproduct of making
# autogenerated-config.h:
autogenerated-EXTRA_CFLAGS.txt: autogenerated-config.h
# autogenerated-casts.h is a byproduct of making autogenerated-casts.c
autogenerated-casts.h: autogenerated-casts.c
$(PLUGIN_GENERATED_SOURCE_FILES): autogenerated-%.c: generate-%-c.py $(GENERATOR_DEPS)
$(PYTHON) $< > $@
autogenerated-casts.c: autogenerated-gimple-types.txt autogenerated-tree-types.txt autogenerated-rtl-types.txt generate-casts-c.py
PYTHONPATH=$(srcdir)./gcc-c-api $(PYTHON) $(srcdir)generate-casts-c.py autogenerated-casts.c autogenerated-casts.h $(xmldir)
autogenerated-gimple.c: autogenerated-gimple-types.txt autogenerated-tree-types.txt autogenerated-rtl-types.txt maketreetypes.py
autogenerated-tree.c: autogenerated-tree-types.txt maketreetypes.py
autogenerated-rtl.c: autogenerated-rtl-types.txt maketreetypes.py
autogenerated-variable.c: autogenerated-gimple-types.txt maketreetypes.py
bindir=/usr/bin
mandir=/usr/share/man
UpperPluginName = $(shell $(PYTHON) -c"print('$(PLUGIN_NAME)'.upper())")
docs/_build/man/gcc-with-python.1: docs/gcc-with-python.rst
cd docs && $(MAKE) man
gcc-with-$(PLUGIN_NAME).1: docs/_build/man/gcc-with-python.1
# Fixup the generic manpage for this build:
cp docs/_build/man/gcc-with-python.1 gcc-with-$(PLUGIN_NAME).1
sed \
-i \
-e"s|gcc-with-python|gcc-with-$(PLUGIN_NAME)|g" \
gcc-with-$(PLUGIN_NAME).1
sed \
-i \
-e"s|GCC-WITH-PYTHON|GCC-WITH-$(UpperPluginName)|g" \
gcc-with-$(PLUGIN_NAME).1
gcc-with-$(PLUGIN_NAME).1.gz: gcc-with-$(PLUGIN_NAME).1
rm -f gcc-with-$(PLUGIN_NAME).1.gz
gzip gcc-with-$(PLUGIN_NAME).1
man: gcc-with-$(PLUGIN_NAME).1.gz
install: $(PLUGIN_DSO) gcc-with-$(PLUGIN_NAME).1.gz
mkdir -p $(DESTDIR)$(GCCPLUGINS_DIR)
cd gcc-c-api && $(MAKE) install
cp $(PLUGIN_DSO) $(DESTDIR)$(GCCPLUGINS_DIR)
mkdir -p $(DESTDIR)$(GCCPLUGINS_DIR)/$(PLUGIN_DIR)
cp -a gccutils $(DESTDIR)$(GCCPLUGINS_DIR)/$(PLUGIN_DIR)
cp -a libcpychecker $(DESTDIR)$(GCCPLUGINS_DIR)/$(PLUGIN_DIR)
# Create "gcc-with-" support script:
mkdir -p $(DESTDIR)$(bindir)
install -m 755 gcc-with-python $(DESTDIR)/$(bindir)/gcc-with-$(PLUGIN_NAME)
# Fixup the reference to the plugin in that script, from being expressed as
# a DSO filename with a path (for a working copy) to a name of an installed
# plugin within GCC's search directory:
sed \
-i \
-e"s|-fplugin=[^ ]*|-fplugin=$(PLUGIN_NAME)|" \
$(DESTDIR)$(bindir)/gcc-with-$(PLUGIN_NAME)
# Fixup the plugin name within -fplugin-arg-PLUGIN_NAME-script to match the
# name for this specific build:
sed \
-i \
-e"s|-fplugin-arg-python-script|-fplugin-arg-$(PLUGIN_NAME)-script|" \
$(DESTDIR)$(bindir)/gcc-with-$(PLUGIN_NAME)
mkdir -p $(DESTDIR)$(mandir)/man1
cp gcc-with-$(PLUGIN_NAME).1.gz $(DESTDIR)$(mandir)/man1
# Hint for debugging: add -v to the gcc options
# to get a command line for invoking individual subprocesses
# Doing so seems to require that paths be absolute, rather than relative
# to this directory
TEST_CFLAGS= \
-fplugin=$(CURDIR)/$(PLUGIN_DSO) \
-fplugin-arg-python-script=test.py
# A catch-all test for quick experimentation with the API:
test: plugin
$(INVOCATION_ENV_VARS) $(CC) -v $(TEST_CFLAGS) $(CURDIR)/test.c
# Selftest for the cpychecker.py code:
testcpychecker: plugin
$(INVOCATION_ENV_VARS) $(PYTHON) $(srcdir)./testcpychecker.py -v
# Selftest for the cpybuilder code:
testcpybuilder:
$(PYTHON) $(srcdir)./testcpybuilder.py -v
# Selftest for the dejagnu.py code:
testdejagnu:
$(PYTHON) $(srcdir)./dejagnu.py -v
dump_gimple:
$(CC) -fdump-tree-gimple $(CURDIR)/test.c
debug: plugin
$(INVOCATION_ENV_VARS) $(CC) -v $(TEST_CFLAGS) $(CURDIR)/test.c
$(pwd)/gcc-with-cpychecker: gcc-with-cpychecker
cp $< $@
# A simple demo, to make it easy to demonstrate the cpychecker:
demo: demo.c plugin $(pwd)/gcc-with-cpychecker
$(INVOCATION_ENV_VARS) ./gcc-with-cpychecker -c $(PYTHON_INCLUDES) $<
# Run 'demo', and verify the output.
testdemo: DEMO_REF=$(shell \
if [ $$(./print-gcc-version) -ge 7000 ]; then \
echo demo.expected.no-refcounts; \
else \
echo demo.expected; \
fi)
testdemo: plugin print-gcc-version
$(MAKE) -f $(srcdir)./Makefile demo > demo.out 2> demo.err
egrep '^.*demo.c:( In function |[0-9][0-9]*:[0-9][0-9]*: warning:)' \
demo.err \
| sed 's/:[0-9][0-9]*: warning:/:: warning:/;s/ \[enabled by default\]//' \
| sed "s%$(srcdir)demo.c:%demo.c:%g" \
> demo.filtered
diff $(srcdir)./$(DEMO_REF) demo.filtered
rm demo.out demo.err demo.filtered
json-examples: plugin
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-cpychecker -I/usr/include/python2.7 -c libcpychecker_html/test/example1/bug.c
test-suite: plugin print-gcc-version testdejagnu testdemo
$(INVOCATION_ENV_VARS) $(PYTHON) $(srcdir)./run-test-suite.py $(if $(srcdir),--srcdir=$(srcdir))
show-ssa: plugin
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-python examples/show-ssa.py test.c
demo-show-lto-supergraph: plugin
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-python \
examples/show-lto-supergraph.py \
-flto \
-flto-partition=none \
tests/examples/lto/input-*.c
html: docs/tables-of-passes.rst docs/passes.svg
cd docs && $(MAKE) html
# We commit this generated file to SCM to allow the docs to be built without
# needing to build the plugin:
docs/tables-of-passes.rst: plugin generate-tables-of-passes-rst.py
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-python generate-tables-of-passes-rst.py test.c > $@
# Likewise for this generated file:
docs/passes.svg: plugin generate-passes-svg.py
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-python generate-passes-svg.py test.c
check-api:
xmllint --noout --relaxng $(srcdir)./gcc-c-api/api.rng $(srcdir)./gcc-c-api/*.xml
# Utility target, to help me to make releases
# - creates a tag in git (but does not push it; see "Notes to self on
# making a release" below)
# - creates a tarball
#
# The following assumes that VERSION has been set e.g.
# $ make tarball VERSION=0.4
$(HOME)/rpmbuild/SOURCES/%.tar.gz:
test -n "$(VERSION)"
-git tag -d v$(VERSION)
git tag -a v$(VERSION) -m"$(VERSION)"
git archive --format=tar --prefix=$*/ v$(VERSION) | gzip > $*.tar.gz
sha256sum $*.tar.gz
cp $*.tar.gz $@
tarball: $(HOME)/rpmbuild/SOURCES/gcc-python-plugin-$(VERSION).tar.gz
# Notes to self on making a release
# ---------------------------------
#
# Before tagging:
#
# * update the version/release in docs/conf.py
#
# * update the version in gcc-python-plugin.spec
#
# * add release notes to docs
#
# Test the candidate tarball via a scratch SRPM build locally (this
# achieves test coverage against python 2 and 3, for both debug and
# optimized python, on one arch, against the locally-installed version of
# gcc):
#
# $ make srpm VERSION=fixme
#
# $ make rpm VERSION=fixme
#
# Test the candidate tarball via a scratch SRPM build in Koji (this
# achieves test coverage against python 2 and 3, for both debug and
# optimized python, on both i686 and x86_64, against another version of
# gcc):
#
# $ make koji VERSION=fixme
#
# After successful testing of a candidate tarball:
#
# * push the tag:
#
# $ git push --tags
#
# * upload it to https://fedorahosted.org/releases/g/c/gcc-python-plugin/
# via:
#
# $ scp gcc-python-plugin-$(VERSION).tar.gz dmalcolm@fedorahosted.org:gcc-python-plugin
#
# * add version to Trac: https://fedorahosted.org/gcc-python-plugin/admin/ticket/versions
#
# * update release info at https://fedorahosted.org/gcc-python-plugin/wiki#Code
#
# * send release announcement:
#
# To: gcc@gcc.gnu.org, gcc-python-plugin@lists.fedorahosted.org, python-announce-list@python.org
# Subject: ANN: gcc-python-plugin $(VERSION)
# (etc)
#
# * build it into Fedora
# Utility target, for building test rpms:
srpm:
rpmbuild -bs gcc-python-plugin.spec
# Perform a test rpm build locally:
rpm:
rpmbuild -ba gcc-python-plugin.spec
# Perform a test (scratch) build in Koji:
# The following have been deleted from Koji:
# f16 was gcc 4.6
# f17 was gcc 4.7
# f19 was gcc 4.8
koji-gcc-5: srpm
koji build --scratch f23 ~/rpmbuild/SRPMS/gcc-python-plugin-$(VERSION)-1.fc20.src.rpm
koji-gcc-6: srpm
koji build --scratch f24 ~/rpmbuild/SRPMS/gcc-python-plugin-$(VERSION)-1.fc20.src.rpm
koji: koji-gcc-5 koji-gcc-6
================================================
FILE: README.rst
================================================
gcc-python
==========
This is a plugin for GCC, which links against libpython, and (I hope) allows
you to invoke arbitrary Python scripts from inside the compiler. The aim is to
allow you to write GCC plugins in Python.
The plugin is Free Software, licensed under the GPLv3 (or later).
It's still at the "experimental proof-of-concept stage"; expect crashes and
tracebacks (I'm new to insides of GCC, and I may have misunderstood things).
It's already possible to use this to add additional compiler errors/warnings,
e.g. domain-specific checks, or static analysis. One of my goals for this is
to "teach" GCC about the common mistakes people make when writing extensions
for CPython, but it could be used e.g. to teach GCC about GTK's
reference-counting semantics, or about locking in the Linux kernel, or about
signal-safety in APIs.
Other ideas include visualizations of code structure. Given a ``gcc.CFG``
instance, ``gccutils.render_to_dot(cfg)`` and ``gccutils.invoke_dot(cfg)`` will
use graphviz and eog to plot a handy visualization of a control flow graph,
showing the source code interleaved with GCC's ``GIMPLE`` internal
representation.
The documentation can be seen at:
http://gcc-python-plugin.readthedocs.io/en/latest/index.html
Requirements
------------
* GCC: 4.6 or later (it uses APIs that weren't exposed to plugins in 4.5)
* tested with 4.8, 4.9, 5, 6, 7, and 8.
* GCC plugin development package: usually available in distribution packages
such as ``gcc-N-plugin-dev`` or ``gcc-plugin-devel``.
* Python: requires 2.7 or 3.2 or later
* "six": The libcpychecker code uses the "six_" Python compatibility library to
smooth over Python 2 vs Python 3 differences, both at build-time and
run-time
.. _six: http://pypi.python.org/pypi/six/
Usage
-----
I use::
make
to build the plugin and run the tests
You can also use::
make demo
to demonstrate the new compiler errors.
Development has been on x86_64 and I don't know to what extent it will be
compatible with other architectures.
There isn't an installer yet. In theory you should be able to add these
arguments to the gcc invocation::
gcc -fplugin=python.so -fplugin-arg-python-script=PATH_TO_SCRIPT.py OTHER_ARGS
and have it run your script as the plugin starts up.
The plugin automatically adds the absolute path to its own directory to the
end of its `sys.path`, so that it can find support modules, such as gccutils.py
and `libcpychecker`.
The exact API is still in flux; you can currently connect to events by
registering callbacks e.g. to be called for each function in the source at
different passes.
It exposes GCC's various types as Python objects, within a "gcc" module. You
can see the API by running::
import gcc
help(gcc)
from within a script.
Overview of the code
--------------------
This is currently three projects in one:
``gcc-python-*``: the plugin for GCC. The entrypoint (``init_plugin``) is in
``gcc-python.c``.
``libcpychecker`` and ``cpychecker.py``: a Python library (and a driver script),
written for the plugin, in which I'm building new compiler warnings to
help people find bugs in CPython extension code.
``cpybuilder``: a handy module for programatically generating C source code for
CPython extensions. I use this both to generate parts of the GCC plugin, and
also in the selftests for the cpychecker script. (I initially attempted to use
Cython for the former, but wrapping the "tree" type hierarchy required more
programatic control)
Coding style: Python and GCC each have their own coding style guide for C.
I've chosen to follow Python's (PEP-7), as I prefer it (although my code is
admittedly a mess in places).
You'll find API documentation within the "docs" directory, written in the
reStructuredText format (as is this file, in fact). If you have Sphinx_
installed, you can regenerate these docs using::
make html
within the ``docs`` directory. Sphinx is the ``python-sphinx`` package on a
Fedora/RHEL box.
.. _Sphinx: http://sphinx.pocoo.org/
More detailed documentation can be seen within ``docs/getting-involved.rst``.
Enjoy!
David Malcolm <dmalcolm@redhat.com>
================================================
FILE: configbuilder.py
================================================
# Copyright 2012 David Malcolm <dmalcolm@redhat.com>
# Copyright 2012 Red Hat, Inc.
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
import os
import shutil
from subprocess import Popen, PIPE, check_output
import sys
def indent(prefix, text):
text = str(text)
return '\n'.join([prefix + line
for line in text.splitlines()])
class ConfigurationFailure(Exception):
pass
class CheckFor:
"""
Context manager for wrapping a feature test
The feature test should raise ConfigurationFailure to signify a failure
"""
def __init__(self, initmsg, mandatory, okmsg=None, failmsg='failed'):
self.initmsg = initmsg
self.mandatory = mandatory
self.okmsg = okmsg
self.failmsg = failmsg
self.result = None
# context manager hooks:
def __enter__(self):
sys.stdout.write('%s... ' % self.initmsg) # no newline
return self
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type:
# exception occurred:
self.result = False
# is it one of ours, signifiying the failure of a test?
if isinstance(exc_val, ConfigurationFailure):
# Write the failure message:
sys.stdout.write('%s\n' % self.failmsg)
if self.mandatory:
# Print diagnostic information:
print(exc_val)
# terminate the build
sys.exit(1)
else:
return True # swallow the exception
else:
# some kind of unexpected error; propagate it:
return False
else:
# Assume success:
self.result = True
# Write the success message:
if self.okmsg:
sys.stdout.write('%s\n' % self.okmsg)
def succeeded(self):
# Did this test succeed?
return self.result
class Result:
pass
class OptionFlag(Result):
# the outcome of a feature test
def __init__(self, description, flag, defn):
self.description = description
self.flag = flag
self.defn = defn
def write_to(self, f):
f.write('/* %s */\n' % self.description)
if self.flag:
f.write('#define %s\n\n' % self.defn)
else:
f.write('#undef %s\n\n' % self.defn)
class ConfigBuilder:
def __init__(self, argv):
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-o', '--output-file')
args = parser.parse_args(argv[1:])
#print(args)
self.filename = args.output_file
self.dirname = 'config-tests'
if os.path.exists(self.dirname):
shutil.rmtree(self.dirname)
os.mkdir(self.dirname)
self.testid = 0
self.results = []
def make_test_dir(self, test):
self.testid += 1
dirname = ('%05i-' % self.testid) + test.initmsg
dirname = '-'.join(dirname.split())
dirpath = os.path.join(self.dirname, dirname)
os.mkdir(dirpath)
return dirpath
def write_outcome(self):
sys.stdout.write('writing %s\n' % self.filename)
with open(self.filename, 'w') as f:
f.write('/* autogenerated header file */\n\n')
for r in self.results:
r.write_to(f)
def compile(self, test, src, extraargs):
dirpath = self.make_test_dir(test)
srcpath = os.path.join(dirpath, 'feature-test.c')
with open(srcpath, 'w') as f:
f.write(src)
outpath = os.path.join(dirpath, 'feature-test.o')
args= [os.environ.get('CC', 'gcc'),
'-c', # don't run the linker (no main)
'-o', outpath]
args += extraargs
args += [srcpath]
p = Popen(args, stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate()
c = p.wait()
if c != 0:
class CompilationError(ConfigurationFailure):
def __str__(self):
result = 'Test compilation failed with exit code %i\n' % c
result += ' The command was:\n'
result += ' %s\n' % ' '.join(args)
result += ' The source was: (in %s)\n' % srcpath
result += indent(' ', src) + '\n'
result += ' The stderr was:\n'
result += indent(' ', stderr) + '\n'
return result
raise CompilationError()
def capture_shell_output(self, initmsg, cmd):
with CheckFor(initmsg,
mandatory=True) as test:
out = check_output(cmd,
shell=True) # input must be trusted
out = str(out.decode())
sys.stdout.write('%s\n' % out.strip())
return out
def test_for_mandatory_c_header(self, header, extraargs):
with CheckFor('checking for %s' % header,
okmsg='found',
failmsg='not found',
mandatory=True) as test:
self.compile(test,
src='#include <%s>' % header,
extraargs=extraargs)
def test_c_compilation(self, initmsg, src, extraargs, description, defn):
with CheckFor(initmsg,
okmsg='yes',
failmsg='no',
mandatory=False) as test:
self.compile(test,
src,
extraargs)
self.results.append(OptionFlag(description,
test.succeeded(),
defn))
================================================
FILE: contributors.rst
================================================
Alexandre Lissy
David Malcolm
David Narvaez
Tom Tromey
================================================
FILE: cpybuilder.py
================================================
# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>
# Copyright 2011, 2012 Red Hat, Inc.
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
from subprocess import Popen, PIPE
import re
# For the purpose of the GCC plugin, it's OK to assume that we're compiling
# with GCC itself, and thus we can use GCC extensions
with_gcc_extensions = True
def camel_case(txt):
return ''.join([word.title()
for word in txt.split('_')])
def nullable_ptr(ptr):
if ptr:
return ptr
else:
return 'NULL'
def simple_unaryfunc(identifier, typename, c_expression):
"""Define a simple unaryfunc, using a specifc PyObject subclass"""
self.add_defn("static PyObject *\n" +
"%s(%s *self)\n" % (identifier, typename) +
"{\n" +
" return %s;\n" % c_expression +
"}\n\n")
return identifier
class NamedEntity:
"""A thing within C code that has an identifier"""
def __init__(self, identifier):
self.identifier = identifier
def c_ptr_field(self, name, cast=None):
if hasattr(self, name):
val = getattr(self, name)
else:
val = None
if cast:
caststr = '(%s)' % cast
else:
caststr = ''
if with_gcc_extensions:
# Designate the initializer fields:
return ' .%s = %s%s,\n' % (name, caststr, nullable_ptr(val))
else:
return ' %s%s, /* %s */\n' % (caststr, nullable_ptr(val), name)
def unaryfunc_field(self, name):
return self.c_ptr_field(name, 'unaryfunc')
def c_src_field(self, name):
assert hasattr(self, name)
val = getattr(self, name)
if with_gcc_extensions:
# Designate the initializer fields:
return ' .%s = %s,\n' % (name, val)
else:
return ' %s, /* %s */\n' % (val, name)
def c_src_field_value(self, name, val, cast=None):
if cast:
caststr = '(%s)' % cast
else:
caststr = ''
if with_gcc_extensions:
# Designate the initializer fields:
return ' .%s = %s%s,\n' % (name, caststr, val)
else:
return ' %s%s, /* %s */\n' % (caststr, val, name)
class PyGetSetDef:
def __init__(self, name, get, set, doc, closure=None):
self.name = name
self.get = get
self.set = set
self.doc = doc
self.closure = closure
def c_defn(self):
result = ' {(char*)"%s",\n' % self.name
result += ' (getter)%s,\n' % nullable_ptr(self.get)
result += ' (setter)%s,\n' % nullable_ptr(self.set)
result += ' (char*)"%s",\n' % nullable_ptr(self.doc)
result += ' %s},\n' % nullable_ptr(self.closure)
return result
class PyGetSetDefTable(NamedEntity):
def __init__(self, identifier, gsdefs, identifier_prefix=None, typename=None):
NamedEntity.__init__(self, identifier)
self.gsdefs = gsdefs
self.identifier_prefix = identifier_prefix
self.typename = typename
def c_defn(self):
result = 'static PyGetSetDef %s[] = {\n' % self.identifier
for gsdef in self.gsdefs:
result += gsdef.c_defn()
result += ' {NULL} /* Sentinel */\n'
result += '};\n'
return result
def add_gsdef(self, name, getter, setter, doc, closure=None):
self.gsdefs.append(PyGetSetDef(name, getter, setter, doc, closure=None))
def add_simple_getter(self, cu, name, c_expression, doc):
assert self.identifier_prefix
assert self.typename
identifier = self.identifier_prefix + '_get_' + name
cu.add_simple_getter(identifier, self.typename, c_expression)
self.add_gsdef(name, identifier, None, doc)
METH_VARARGS = 'METH_VARARGS'
class PyMethodDef:
def __init__(self, name, fn_name, args, docstring):
self.name = name
self.fn_name = fn_name
#assert args in ('METH_VARARGS', ) # FIXME
self.args = args
self.docstring = docstring
def c_defn(self):
return (' {(char*)"%(name)s", %(fn_name)s, %(args)s,\n'
' (char*)"%(docstring)s"},\n' % self.__dict__)
class PyMethodTable(NamedEntity):
def __init__(self, identifier, methods):
NamedEntity.__init__(self, identifier)
self.methods = methods
def c_defn(self):
result = 'static PyMethodDef %s[] = {\n' % self.identifier
for method in self.methods:
result += method.c_defn()
result += ' {NULL, NULL, 0, NULL} /* Sentinel */\n'
result += '};\n'
return result
def add_method(self, name, fn_name, args, docstring):
self.methods.append(PyMethodDef(name, fn_name, args, docstring))
# See http://docs.python.org/c-api/typeobj.html#number-structs
class PyNumberMethods(NamedEntity):
def __init__(self, identifier):
NamedEntity.__init__(self, identifier)
def c_defn(self):
result = 'static PyNumberMethods %s = {\n' % self.identifier
result += self.c_ptr_field('nb_add')
result += self.c_ptr_field('nb_subtract')
result += self.c_ptr_field('nb_multiply')
result += '#if PY_MAJOR_VERSION < 3\n'
result += self.c_ptr_field('nb_divide')
result += '#endif\n'
result += self.c_ptr_field('nb_remainder')
result += self.c_ptr_field('nb_divmod')
result += self.c_ptr_field('nb_power')
result += self.unaryfunc_field('nb_negative')
result += self.unaryfunc_field('nb_positive')
result += self.unaryfunc_field('nb_absolute')
result += '#if PY_MAJOR_VERSION >= 3\n'
result += self.c_ptr_field('nb_bool')
result += '#else\n'
result += self.c_ptr_field('nb_nonzero')
result += '#endif\n'
result += self.unaryfunc_field('nb_invert')
result += self.c_ptr_field('nb_lshift')
result += self.c_ptr_field('nb_rshift')
result += self.c_ptr_field('nb_and')
result += self.c_ptr_field('nb_xor')
result += self.c_ptr_field('nb_or')
result += '#if PY_MAJOR_VERSION < 3\n'
result += self.c_ptr_field('nb_coerce')
result += '#endif\n'
result += self.unaryfunc_field('nb_int')
result += '#if PY_MAJOR_VERSION >= 3\n'
result += self.c_ptr_field('nb_reserved')
result += '#else\n'
result += self.unaryfunc_field('nb_long')
result += '#endif\n'
result += self.unaryfunc_field('nb_float')
result += '#if PY_MAJOR_VERSION < 3\n'
result += self.unaryfunc_field('nb_oct')
result += self.unaryfunc_field('nb_hex')
result += '#endif\n'
result += self.c_ptr_field('nb_inplace_add')
result += self.c_ptr_field('nb_inplace_subtract')
result += self.c_ptr_field('nb_inplace_multiply')
result += '#if PY_MAJOR_VERSION < 3\n'
result += self.c_ptr_field('nb_inplace_divide')
result += '#endif\n'
result += self.c_ptr_field('nb_inplace_remainder')
result += self.c_ptr_field('nb_inplace_power')
result += self.c_ptr_field('nb_inplace_lshift')
result += self.c_ptr_field('nb_inplace_rshift')
result += self.c_ptr_field('nb_inplace_and')
result += self.c_ptr_field('nb_inplace_xor')
result += self.c_ptr_field('nb_inplace_or')
result += self.c_ptr_field('nb_floor_divide')
result += self.c_ptr_field('nb_true_divide')
result += self.c_ptr_field('nb_inplace_floor_divide')
result += self.c_ptr_field('nb_inplace_true_divide')
result += self.unaryfunc_field('nb_index')
result += '};\n'
return result
def add_method(self, name, fn_name, args, docstring):
self.methods.append(PyMethodDef(name, fn_name, args, docstring))
class PyTypeObject(NamedEntity):
def __init__(self, identifier, localname, tp_name, struct_name, **kwargs):
NamedEntity.__init__(self, identifier)
self.localname = localname
self.tp_name = tp_name
self.struct_name = struct_name
self.__dict__.update(kwargs)
if not hasattr(self, 'tp_new'):
self.tp_new = 'PyType_GenericNew'
if not hasattr(self, 'tp_flags'):
self.tp_flags = 'Py_TPFLAGS_DEFAULT'
def c_defn(self):
result = '\n'
result += 'PyTypeObject %(identifier)s = {\n' % self.__dict__
result += self.c_initializer()
result += '};\n' % self.__dict__
result +='\n'
return result
def c_initializer(self):
if hasattr(self, 'ob_type'):
ob_type_str = getattr(self, 'ob_type')
else:
ob_type_str = 'NULL'
result = ' PyVarObject_HEAD_INIT(%s, 0)\n' % ob_type_str
result += ' "%(tp_name)s", /*tp_name*/\n' % self.__dict__
result += ' sizeof(%(struct_name)s), /*tp_basicsize*/\n' % self.__dict__
result += ' 0, /*tp_itemsize*/\n'
result += self.c_ptr_field('tp_dealloc')
result += '#if PY_VERSION_HEX >= 0x03080000\n'
result += ' 0, /*tp_vectorcall_offset*/\n'
result += '#else\n'
result += self.c_ptr_field('tp_print')
result += '#endif\n'
result += self.c_ptr_field('tp_getattr')
result += self.c_ptr_field('tp_setattr')
result += '#if PY_MAJOR_VERSION < 3\n' % self.__dict__
result += ' 0, /*tp_compare*/\n' % self.__dict__
result += '#else\n' % self.__dict__
result += ' 0, /*reserved*/\n' % self.__dict__
result += '#endif\n' % self.__dict__
result += self.c_ptr_field('tp_repr')
result += self.c_ptr_field('tp_as_number')
result += self.c_ptr_field('tp_as_sequence')
result += self.c_ptr_field('tp_as_mapping')
result += self.c_ptr_field('tp_hash')
result += self.c_ptr_field('tp_call')
result += self.c_ptr_field('tp_str')
result += self.c_ptr_field('tp_getattro')
result += self.c_ptr_field('tp_setattro')
result += self.c_ptr_field('tp_as_buffer')
result += self.c_src_field('tp_flags')
result += ' 0, /*tp_doc*/\n'
result += self.c_ptr_field('tp_traverse')
result += self.c_ptr_field('tp_clear')
result += self.c_ptr_field('tp_richcompare')
result += ' 0, /* tp_weaklistoffset */\n'
result += self.c_ptr_field('tp_iter')
result += self.c_ptr_field('tp_iternext')
result += self.c_ptr_field('tp_methods')
result += self.c_ptr_field('tp_members')
result += self.c_ptr_field('tp_getset')
result += self.c_ptr_field('tp_base', 'PyTypeObject*')
result += self.c_ptr_field('tp_dict')
result += self.c_ptr_field('tp_descr_get')
result += self.c_ptr_field('tp_descr_set')
result += ' 0, /* tp_dictoffset */\n'
result += self.c_ptr_field('tp_init', 'initproc')
result += self.c_ptr_field('tp_alloc')
result += self.c_ptr_field('tp_new')
result += self.c_ptr_field('tp_free')
result += self.c_ptr_field('tp_is_gc')
result += self.c_ptr_field('tp_bases')
result += self.c_ptr_field('tp_mro')
result += self.c_ptr_field('tp_cache')
result += self.c_ptr_field('tp_subclasses')
result += self.c_ptr_field('tp_weaklist')
result += self.c_ptr_field('tp_del')
result += '#if PY_VERSION_HEX >= 0x02060000\n' % self.__dict__
result += ' 0, /*tp_version_tag*/\n' % self.__dict__
result += '#endif\n' % self.__dict__
result += '\n'
return result
def c_invoke_type_ready(self):
return (' if (PyType_Ready((PyTypeObject*)&%(identifier)s) < 0)\n'
' goto error;\n'
'\n') % self.__dict__
def c_invoke_add_to_module(self):
return (' Py_INCREF(&%(identifier)s);\n'
' PyModule_AddObject(m, "%(localname)s", (PyObject *)&%(identifier)s);\n'
'\n') % self.__dict__
class PyModule:
def __init__(self, modname, modmethods, moddoc):
self.modname = modname
self.moddoc = moddoc
assert (modmethods is None) or isinstance(modmethods, PyMethodTable)
self.modmethods = modmethods
if self.modmethods:
self.modmethods_as_ptr = self.modmethods.identifier
else:
self.modmethods_as_ptr = 'NULL'
def c_initfn_decl(self):
return ("""
#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC init%(modname)s(void);
#else
PyMODINIT_FUNC PyInit_%(modname)s(void);
#endif
""" % self.__dict__)
def c_initfn_def_begin(self):
return ("""
#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC init%(modname)s(void)
#else
PyMODINIT_FUNC PyInit_%(modname)s(void)
#endif
{
PyObject *m = NULL;
""" % self.__dict__)
def c_initfn_def_end(self):
return ("""
#if PY_MAJOR_VERSION < 3
return;
#else
return m;
#endif
error:
#if PY_MAJOR_VERSION < 3
return;
#else
Py_XDECREF(m);
return NULL;
#endif
}
""")
def c_py3k_moduledef(self):
return ("""
#if PY_MAJOR_VERSION >= 3
static PyModuleDef %(modname)smodule = {
PyModuleDef_HEAD_INIT,
"%(modname)s", /* m_name */
"%(moddoc)s", /* m_doc */
-1, /* m_size */
%(modmethods_as_ptr)s, /* m_methods */
NULL, NULL, NULL, NULL
};
#endif
""" % self.__dict__)
def c_invoke_ctor(self):
return ("""
#if PY_MAJOR_VERSION < 3
m = Py_InitModule3("%(modname)s", %(modmethods_as_ptr)s,
"%(moddoc)s");
#else
m = PyModule_Create(&%(modname)smodule);
#endif
if (!m) {
goto error;
}
""" % self.__dict__)
class CompilationUnit:
"""
A single C file
"""
def __init__(self):
self._includes = '#include <Python.h>\n'
self._prototypes = ''
self._definitions = ''
def add_include(self, path):
self._includes += '#include "%s"\n' % path
def add_decl(self, text):
self._prototypes += text
def add_defn(self, text):
self._definitions += text
def as_str(self):
return ('/* Autogenerated by cpybuilder */\n' +
self._includes +
self.make_header('Prototypes') +
self._prototypes +
self.make_header('Definitions') +
self._definitions)
def make_header(self, text):
return '\n/**** %s ****/\n\n' % text
def add_simple_getter(self, identifier, typename, c_expression):
"""Define a simple getter, suitable for use by a PyGetSetDef"""
self.add_defn("static PyObject *\n" +
"%s(%s *self, void *closure)\n" % (identifier, typename) +
"{\n" +
" return %s;\n" % c_expression +
"}\n\n")
return identifier
def add_simple_setter(self, identifier, typename, attrname, c_typecheck_fn, c_assignment):
"""Define a simple setter, suitable for use by a PyGetSetDef"""
self.add_defn("static int\n" +
"%s(%s *self, PyObject *value, void *closure)\n" % (identifier, typename) +
"{\n" +
" if (! %s(value)) {\n" % c_typecheck_fn +
" PyErr_SetString(PyExc_TypeError,\n" +
' "%s must be an int");\n' % attrname +
' return -1;\n'
' }\n' +
' %s;\n' % c_assignment +
" return 0;\n"
"}\n\n")
return identifier
def add_simple_int_setter(self, identifier, typename, attrname, c_assignment):
"""
Define a simple setter for an int-valued attribute, suitable for use
by a PyGetSetDef
"""
return self.add_simple_setter(identifier, typename, attrname,
'PyGccInt_Check',
c_assignment)
class SimpleModule:
"""
A C extension module built from a single C file
"""
def __init__(self):
self.cu = CompilationUnit()
self._modinit_preinit = ''
self._modinit_postinit = ''
def add_type_object(self, name, localname,
tp_name, struct_name, **kwargs):
pytype = PyTypeObject(name, localname, tp_name, struct_name, **kwargs)
self.cu.add_defn(pytype.c_defn())
self._modinit_preinit += pytype.c_invoke_type_ready()
self._modinit_postinit += pytype.c_invoke_add_to_module()
def add_module_init(self, modname, modmethods, moddoc):
pymod = PyModule(modname, modmethods, moddoc)
self.cu.add_decl(pymod.c_initfn_decl())
self.cu.add_defn(pymod.c_py3k_moduledef())
self.cu.add_defn(pymod.c_initfn_def_begin())
self.cu.add_defn(self._modinit_preinit)
self.cu.add_defn(pymod.c_invoke_ctor())
self.cu.add_defn(self._modinit_postinit)
self.cu.add_defn(pymod.c_initfn_def_end())
class SimpleBuild:
def __init__(self, sm, builddir='.'):
self.sm
#def generate_c(self):
# with open(sm.name
class CommandError(RuntimeError):
def __init__(self, out, err, p):
assert isinstance(out, str)
assert isinstance(err, str)
assert isinstance(p, Popen)
self.out = out
self.err = err
self.p = p
def __str__(self):
result = '\n'
result += 'returncode: %r\n' % self.p.returncode
result += ' %s\n' % self._describe_activity()
result += 'Stdout:\n'
result += self._indent(self.out)
result += '\nStderr:\n'
result += self._indent(self.err, 4)
result += self._extra_info()
return result
def _indent(self, txt, size=2):
return '\n'.join([' '*size + line for line in txt.splitlines()])
def _extra_info(self):
return ''
class PyRuntimeError(CommandError):
def __init__(self, runtime, cmd, out, err, p):
CommandError.__init__(self, out, err, p)
self.runtime = runtime
self.cmd = cmd
def _describe_activity(self):
return 'running: %s -c %r' % (self.runtime.executable , self.cmd)
from collections import namedtuple
class PyVersionInfo(namedtuple('PyVersionInfo', 'major minor micro releaselevel serial')):
@classmethod
def from_text(cls, txt):
# e.g.:
# sys.version_info(major=2, minor=7, micro=1, releaselevel='final', serial=0)
m = re.match('sys\.version_info\(major=([0-9]+), minor=([0-9]+), micro=([0-9]+), releaselevel=\'(.*)\', serial=([0-9]+)\)', txt)
return PyVersionInfo(major=int(m.group(1)),
minor=int(m.group(2)),
micro=int(m.group(3)),
releaselevel=m.group(4),
serial=int(m.group(5)))
================================================
FILE: cpychecker.py
================================================
# Copyright 2011 David Malcolm <dmalcolm@redhat.com>
# Copyright 2011 Red Hat, Inc.
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
from libcpychecker import main
main()
================================================
FILE: dejagnu.py
================================================
# Copyright 2017 David Malcolm <dmalcolm@redhat.com>
# Copyright 2017 Red Hat, Inc.
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
# A Python reimplementation of parts of DejaGnu
import re
import unittest
class Directive:
"""
A "dg-*" directive within an input file.
"""
def __init__(self, inputfile, linenum, name, args):
self.inputfile = inputfile
self.linenum = linenum
self.name = name
self.args = self.parse_args(args)
if len(self.args) == 4:
m = re.match('\.(-?[0-9]+)', self.args[3])
offset = int(m.group(1))
self.linenum += offset
@staticmethod
def parse_args(args):
quoted_group = '"([^"]*)"'
ws = '\s+'
m = re.match(quoted_group + ws + quoted_group + ws + '{(.*)}' + ws + '(.+)', args)
if m:
return list(m.groups())
m = re.match(quoted_group + ws + quoted_group + ws + '{(.*)}', args)
if m:
return list(m.groups())
m = re.match(quoted_group + ws + quoted_group, args)
if m:
return list(m.groups())
m = re.match(quoted_group, args)
if m:
return list(m.groups())
m = re.match('(\S+)', args)
if m:
return list(m.groups())
raise ValueError('unparseable directive args: %s' % args)
def __repr__(self):
return ('Directive(%r, %r, %r, %r)'
% (self.inputfile, self.linenum, self.name, self.args))
class ExpectedDiagnostic:
"""
A dg-warning or dg-error, after parsing
"""
def __init__(self, kind, pattern, directive):
self.kind = kind
self.pattern = pattern
self.directive = directive
m = re.match('^([0-9]+): (.*)', self.pattern)
linenum = directive.linenum
if m:
colnum_pattern = m.group(1)
self.pattern = m.group(2)
else:
colnum_pattern = '[0-9]+'
self.pattern = ('\S+:%i:%s: %s: %s\n'
% (linenum, colnum_pattern, self.kind, self.pattern))
def __repr__(self):
return ('ExpectedDiagnostic(%r, %r, %r)'
% (self.kind, self.pattern, self.directive))
class ExpectedMultilineOutput:
def __init__(self, directive, start, end, lines):
self.directive = directive
self.start = start
self.end = end
self.lines = lines
self.pattern = ''.join([re.escape(line) + '\n' for line in self.lines])
def __repr__(self):
return ('ExpectedMultilineOutput(%r, %r, %r, %r)'
% (self.directive, self.start, self.end, self.lines))
class Result:
"""
A result of a test: a PASS/FAIL, with a message, and an optional
directive that was being tested.
"""
def __init__(self, status, directive, message):
self.status = status
self.directive = directive
self.message = message
def __str__(self):
result = '%s: ' % self.status
if self.directive:
result += ('%s:%i: '
% (self.directive.inputfile, self.directive.linenum))
if self.message:
result += self.message
return result
def __repr__(self):
return ('Result(%r, %r, %r)'
% (self.status, self.directive, self.message))
class DgContext:
"""
A Python reimplementation of DejaGnu
"""
def __init__(self, inputfiles, verbosity=0):
self.inputfiles = inputfiles
self.options = []
self.verbosity = 0
self.expected_diagnostics = []
self.results = []
self.echo_results = False
self._cur_multiline_output = None
self.multiline_ranges = []
def parse_directives(self, inputfile):
with open(inputfile, 'r') as f:
lines = f.read().splitlines()
for lineidx, line in enumerate(lines):
directive = self.parse_line(inputfile, lineidx + 1, line)
if directive:
self.handle_directive(directive)
def parse_line(self, inputfile, linenum, line):
"""
Look for line content of the form: "{ dg-FOO BAR }"
"""
m = re.match(r'.*{ (dg-\S+) (.+) }.*', line)
if m:
#print(m.groups())
return Directive(inputfile, linenum, m.group(1), m.group(2))
elif self._cur_multiline_output:
self._cur_multiline_output.lines.append(line)
def handle_directive(self, directive):
if 0:
print(directive)
if directive.name == 'dg-message':
self.expected_diagnostic('note', directive)
elif directive.name == 'dg-options':
self.options.append(directive.args[0])
elif directive.name == 'dg-do':
# For now, skip dg-do
pass
elif directive.name == 'dg-begin-multiline-output':
self.begin_multiline_output(directive)
elif directive.name == 'dg-end-multiline-output':
self.end_multiline_output(directive)
else:
self.on_fail(directive,
'unrecognized directive: %s' % directive.name)
def expected_diagnostic(self, kind, directive):
message = directive.args[0]
ed = ExpectedDiagnostic(kind, message, directive)
self.expected_diagnostics.append(ed)
def begin_multiline_output(self, directive):
self._cur_multiline_output = directive
directive.lines = []
def end_multiline_output(self, directive):
start = self._cur_multiline_output.linenum + 1
end = directive.linenum - 1
lines = self._cur_multiline_output.lines
mr = ExpectedMultilineOutput(self._cur_multiline_output,
start, end, lines)
self.multiline_ranges.append(mr)
self._cur_multiline_output = None
def get_args(self):
return self.options
def check_result(self, stdout, stderr, exitcode):
if 0:
print(self.expected_diagnostics)
if stdout != '':
self.on_fail(None, 'non-empty stdout: %r' % stdout)
# Prune stderr:
if 0:
print('Before pruning:\n%s' % stderr)
stderr = self.prune_stderr(stderr)
if 0:
print('After pruning:\n%s' % stderr)
if stderr != '':
self.on_fail(None, 'unexpected output on stderr: %r' % stderr)
# Check exitcode
if exitcode != 0:
self.on_fail(None, 'nonzero exit code')
if 0:
print(self.results)
def prune_stderr(self, stderr):
# Prune lines like this:
# tests/plugin/rich-location/input.c: In function 'test_1':
stderr = re.sub("(\S+: In function '.+':)\n", '', stderr)
for d in self.expected_diagnostics:
stderr, count = re.subn(d.pattern, '', stderr, 1)
if count == 1:
self.on_pass(d.directive, d.directive.name)
else:
self.on_fail(d.directive, 'diagnostic not found')
for mr in self.multiline_ranges:
stderr, count = re.subn(mr.pattern, '', stderr, 1)
if count == 1:
self.on_pass(mr.directive, 'multiline range')
else:
self.on_fail(mr.directive, 'multiline range not found')
return stderr
def on_pass(self, directive, issue):
self.add_result(Result('PASS', directive, issue))
def on_fail(self, directive, issue):
self.add_result(Result('FAIL', directive, issue))
def add_result(self, result):
if self.echo_results:
print(str(result))
self.results.append(result)
def num_failures(self):
count = 0
for r in self.results:
if r.status == 'FAIL':
count += 1
return count
def uses_dg_directives(inputfiles):
for inputfile in inputfiles:
with open(inputfile, 'r') as f:
code = f.read()
if 'dg-do' in code:
return True
class Tests(unittest.TestCase):
def test_parse_line(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
d = ctxt.parse_line(INPUT_FILE, 42,
'before /* { dg-something "arg1" "arg2" } */ after')
self.assertEqual(d.inputfile, INPUT_FILE)
self.assertEqual(d.linenum, 42)
self.assertEqual(d.name, 'dg-something')
self.assertEqual(d.args, ['arg1', 'arg2'])
def test_nonempty_stdout(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
ctxt.check_result('stray text', '', 0)
self.assertEqual(len(ctxt.results), 1)
self.assertEqual(ctxt.results[0].status, 'FAIL')
self.assertEqual(ctxt.results[0].message,
"non-empty stdout: 'stray text'")
self.assertEqual(ctxt.num_failures(), 1)
def test_surplus_errors(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
ctxt.check_result('', 'stray text', 0)
self.assertEqual(len(ctxt.results), 1)
self.assertEqual(ctxt.results[0].status, 'FAIL')
self.assertEqual(ctxt.results[0].message,
"unexpected output on stderr: 'stray text'")
self.assertEqual(ctxt.num_failures(), 1)
def test_dg_message_found(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
d = ctxt.parse_line(INPUT_FILE, 23,
'before /* { dg-message "17: hello world" } */ after')
ctxt.handle_directive(d)
self.assertEqual(len(ctxt.expected_diagnostics), 1)
ed = ctxt.expected_diagnostics[0]
self.assertEqual(ed.kind, 'note')
self.assertEqual(ed.pattern, '\\S+:23:17: note: hello world\n')
ctxt.check_result('', INPUT_FILE + ':23:17: note: hello world\n', 0)
self.assertEqual(len(ctxt.results), 1)
self.assertEqual(ctxt.results[0].status, 'PASS')
self.assertEqual(ctxt.results[0].message, 'dg-message')
self.assertEqual(ctxt.num_failures(), 0)
def test_dg_message_not_found(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
d = ctxt.parse_line(INPUT_FILE, 23,
'before /* { dg-message "17: hello world" } */ after')
ctxt.handle_directive(d)
self.assertEqual(len(ctxt.expected_diagnostics), 1)
# Incorrect line/column:
ctxt.check_result('', INPUT_FILE + ':24:18: note: hello world\n', 0)
self.assertEqual(len(ctxt.results), 2)
self.assertEqual(ctxt.results[0].status, 'FAIL')
self.assertEqual(ctxt.results[0].message, 'diagnostic not found')
self.assertEqual(ctxt.results[1].status, 'FAIL')
self.assertEqual(ctxt.results[1].message,
"unexpected output on stderr: 'foo.c:24:18: note: hello world\\n'")
self.assertEqual(ctxt.num_failures(), 2)
def test_directive_with_full_args(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
d = ctxt.parse_line(INPUT_FILE, 23,
'/* { dg-message "14: hello world" "title" { target *-*-* } .-1 } */')
self.assertEqual(d.inputfile, INPUT_FILE)
self.assertEqual(d.linenum, 22)
self.assertEqual(d.name, 'dg-message')
self.assertEqual(d.args, ['14: hello world', 'title', ' target *-*-* ', '.-1'])
ctxt.handle_directive(d)
self.assertEqual(len(ctxt.expected_diagnostics), 1)
ed = ctxt.expected_diagnostics[0]
self.assertEqual(ed.kind, 'note')
self.assertEqual(ed.pattern, '\\S+:22:14: note: hello world\n')
self.assertEqual(len(ctxt.expected_diagnostics), 1)
ctxt.check_result('', INPUT_FILE + ':22:14: note: hello world\n', 0)
self.assertEqual(ctxt.num_failures(), 0)
def test_directive_with_full_args_2(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
d = ctxt.parse_line(INPUT_FILE, 23,
'/* { dg-message "14: hello world" "" { target *-*-* } .-1 } */')
self.assertEqual(d.inputfile, INPUT_FILE)
self.assertEqual(d.linenum, 22)
self.assertEqual(d.name, 'dg-message')
self.assertEqual(d.args, ['14: hello world', '', ' target *-*-* ', '.-1'])
ctxt.handle_directive(d)
self.assertEqual(len(ctxt.expected_diagnostics), 1)
ed = ctxt.expected_diagnostics[0]
self.assertEqual(ed.kind, 'note')
self.assertEqual(ed.pattern, '\\S+:22:14: note: hello world\n')
self.assertEqual(len(ctxt.expected_diagnostics), 1)
ctxt.check_result('', INPUT_FILE + ':22:14: note: hello world\n', 0)
self.assertEqual(ctxt.num_failures(), 0)
def test_dg_options(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
d = ctxt.parse_line(INPUT_FILE, 23,
'/* { dg-options "-fdiagnostics-show-caret" } */')
ctxt.handle_directive(d)
self.assertEqual(ctxt.options, ['-fdiagnostics-show-caret'])
def test_dg_do(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
d = ctxt.parse_line(INPUT_FILE, 23,
'/* { dg-do compile } */')
ctxt.handle_directive(d)
self.assertEqual(d.args, ['compile'])
def test_multiline_ranges(self):
INPUT_FILE = 'foo.c'
ctxt = DgContext([INPUT_FILE])
lines = """
/* { dg-begin-multiline-output "" }
{ return foo + bar; }
~~~~^~~~~
{ dg-end-multiline-output "" } */
"""
for lineidx, line in enumerate(lines.splitlines()):
directive = ctxt.parse_line(INPUT_FILE, lineidx + 1, line)
if directive:
ctxt.handle_directive(directive)
self.assertEqual(len(ctxt.multiline_ranges), 1)
mr = ctxt.multiline_ranges[0]
self.assertEqual(mr.start, 3)
self.assertEqual(mr.end, 4)
self.assertEqual(mr.lines,
[' { return foo + bar; }',
' ~~~~^~~~~'])
stderr = (' { return foo + bar; }\n'
+ ' ~~~~^~~~~\n')
ctxt.check_result('', stderr, 0)
self.assertEqual(ctxt.num_failures(), 0)
if __name__ == '__main__':
unittest.main()
================================================
FILE: demo.c
================================================
/*
Copyright 2011 David Malcolm <dmalcolm@redhat.com>
Copyright 2011 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
/* Examples of mistakes made using the Python API */
#include <Python.h>
extern uint16_t htons(uint16_t hostshort);
#if PY_MAJOR_VERSION >= 3
#define PYINT_FROMLONG(l) (PyLong_FromLong(l))
#else
#define PYINT_FROMLONG(l) (PyInt_FromLong(l))
#endif
PyObject *
socket_htons(PyObject *self, PyObject *args)
{
unsigned long x1, x2;
if (!PyArg_ParseTuple(args, "i:htons", &x1)) {
return NULL;
}
x2 = (int)htons((short)x1);
return PYINT_FROMLONG(x2);
}
PyObject *
not_enough_varargs(PyObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, "i")) {
return NULL;
}
Py_RETURN_NONE;
}
PyObject *
too_many_varargs(PyObject *self, PyObject *args)
{
int i, j;
if (!PyArg_ParseTuple(args, "i", &i, &j)) {
return NULL;
}
Py_RETURN_NONE;
}
PyObject *
kwargs_example(PyObject *self, PyObject *args, PyObject *kwargs)
{
double x, y;
char *keywords[] = {"x", "y"};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "(ff):kwargs_example", keywords, &x, &y)) {
return NULL;
}
Py_RETURN_NONE;
}
extern int convert_to_ssize(PyObject *, Py_ssize_t *);
PyObject *
buggy_converter(PyObject *self, PyObject *args)
{
int i;
if (!PyArg_ParseTuple(args, "O&", convert_to_ssize, &i)) {
return NULL;
}
Py_RETURN_NONE;
}
PyObject *
make_a_list_of_random_ints_badly(PyObject *self,
PyObject *args)
{
PyObject *list, *item;
long count, i;
if (!PyArg_ParseTuple(args, "i", &count)) {
return NULL;
}
list = PyList_New(0);
for (i = 0; i < count; i++) {
item = PyLong_FromLong(random());
PyList_Append(list, item);
}
return list;
}
/*
PEP-7
Local variables:
c-basic-offset: 4
indent-tabs-mode: nil
End:
*/
================================================
FILE: demo.expected
================================================
demo.c: In function ‘socket_htons’:
demo.c:36:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i:htons"
demo.c: In function ‘not_enough_varargs’:
demo.c:46:: warning: Not enough arguments in call to PyArg_ParseTuple with format string "i"
demo.c: In function ‘too_many_varargs’:
demo.c:56:: warning: Too many arguments in call to PyArg_ParseTuple with format string "i"
demo.c: In function ‘kwargs_example’:
demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
demo.c: In function ‘buggy_converter’:
demo.c:82:: warning: Mismatching type in call to PyArg_ParseTuple with format code "O&"
demo.c: In function ‘make_a_list_of_random_ints_badly’:
demo.c:96:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i"
demo.c:104:: warning: calling PyList_Append with NULL as argument 1 (list) at demo.c:104
================================================
FILE: demo.expected.no-refcounts
================================================
demo.c: In function ‘socket_htons’:
demo.c:36:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i:htons"
demo.c: In function ‘not_enough_varargs’:
demo.c:46:: warning: Not enough arguments in call to PyArg_ParseTuple with format string "i"
demo.c: In function ‘too_many_varargs’:
demo.c:56:: warning: Too many arguments in call to PyArg_ParseTuple with format string "i"
demo.c: In function ‘kwargs_example’:
demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
demo.c: In function ‘buggy_converter’:
demo.c:82:: warning: Mismatching type in call to PyArg_ParseTuple with format code "O&"
demo.c: In function ‘make_a_list_of_random_ints_badly’:
demo.c:96:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i"
================================================
FILE: docs/0.10.rst
================================================
.. Copyright 2012 David Malcolm <dmalcolm@redhat.com>
Copyright 2012 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
.. covers up to 9f38feba0c69add5a39b69faba528de955ff71a2
0.10
~~~~
Thanks to Buck Golemon, Daniele Varrazzo, David Narvaez, Eevee, Jason Mueller,
Kevin Pyle, Matt Rice and Tom Tromey for their contributions to this release.
Changes to the GCC Python Plugin
================================
* The plugin can now be used with Python 3.3 (fixing Unicode issues and
dict-ordering assumptions).
* The plugin now exposes inline assembler to Python scripts via
:py:class:`gcc.GimpleAsm`.
* There is a new `gccutils.sorted_callgraph()` function to get the callgraph in
topologically-sorted order.
* The test suite has been reworked to fix issues with checkouts on OS X
case-insensitive filesystems.
* C++ support: support for locating the global namespace (aka "::"), for locating
declarations and child namespaces within a namespace, and aliases.
* :py:class:`gcc.Declaration` now has an is_builtin attribute
* Numerous improvements to the plugin's Makefile
Improvements to :doc:`gcc-with-cpychecker </cpychecker>`
========================================================
* By default, the refcount checker is now only run on code that includes
<Python.h> (implemented by checking if the "PyObject" typedef exists).
This greatly speeds up compilation of large projects for which the Python
extension modules are only a small subset of the source tree.
* Added some custom attributes for marking functions that set an exception,
either always, or when returning a negative value::
__attribute__((cpychecker_negative_result_sets_exception))
__attribute__((cpychecker_sets_exception))
* Improve descriptions of ranges: rather than emitting descriptions with the rather
vague "value", such as::
when considering range: 1 <= value <= 0x7fffffff
instead try to embed a descriptive name for the value, such as::
when considering range: 1 <= n <= 0x7fffffff
Mass recompile of Fedora 17's Python extension code
---------------------------------------------------
I ran the reference-count checker on all of the C/C++ Python extension modules
in Fedora 17 and `reported hundreds of genuine problems
<http://fedoraproject.org/wiki/Features/StaticAnalysisOfPythonRefcounts>`_,
many of which have been fixed.
In the process of doing this I found and fixed many problems in the checker
itself. For example:
* the checker now understand's GCC's `__builtin_expect`, fixing various
false reports about dereferencing NULL pointers when running the checker
on Cython-generated code in python-lxml-2.3
* added descriptions of part of SWIG and Cython's internal APIs to suppress
some false positives seen with SWIG and Cython-generated code.
* tweak the refcount rules to fix some false positives where the checker
erroneously considered the case of a deallocation by:
.. code-block:: c
Py_DECREF(obj);
where "obj" provably had other references not owned by the function being
analyzed, and thus for the case where obj->ob_refcnt > 1 the deallocation
could not happen.
The plugin also now has a triaging script which can examine all of the errors
within a build and provide a report, showing all of them in prioritized
categories.
The source tree now contains helper scripts for conducting such a mass recompile.
Pyscopg support
---------------
Daniele Varrazzo used the checker extensively on
`psycopg <http://initd.org/psycopg/>`_, the popular Python interface
to `PostgreSQL <http://www.postgresql.org/>`_, and was able to find and fix
numerous subtle errors:
* https://fedorahosted.org/pipermail/gcc-python-plugin/2012-March/000229.html
* http://initd.org/psycopg/articles/2012/03/29/psycopg-245-released/
Experimental new error visualization
------------------------------------
The checker can now dump its internal representation in JSON form, via a new
`--dump-json` option, and an experimental new renderer can generate HTML from
this. An example can be seen here:
http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-03-19/example/example.html
This is still a work-in-progress
C++ support
-----------
The checker is now able to run on C++ code: support has been added for methods,
references, "this", destructors, the :py:class:`gcc.GimpleNop` operation.
Coverage of the CPython API
---------------------------
The format code handling for Py_BuildValue was missing support for the
following codes:
* 'u' and 'u#'
* 'f' and 'd'
* 'D'
* 'c'
In addition, the handling for 's#' and 'z#' had a bug in which it erroneously
expected an int* or Py_ssize_t*, rather than just a int or Py_ssize_t.
This release fixes these issues, and gives full coverage of all valid
format codes for Py_BuildValue in Python 2.
This release adds heuristics for the behavior of the following CPython API
entrypoints:
* PyCode_New
* PyCObject_FromVoidPtrAndDesc
* PyDict_Size
* PyErr_Clear
* PyEval_CallMethod
* Py_FatalError
* PyFile_SoftSpace, PyFile_WriteObject, and PyFile_WriteString
* PyFloat_AsDouble and PyFloat_FromDouble
* PyFrame_New
* Py_GetVersion
* PyImport_AddModule
* PyIter_Next
* PyNumber_Int, PyNumber_Remainder
* PyObject_CallObject, PyObject_GetAttr, PyObject_GetAttrString, PyObject_GetItem, PyObject_SetAttr, and PyObject_SetAttrString
* PyOS_snprintf
* PyString_InternFromString
* PySequence_Concat, PySequence_GetSlice, PySequence_SetItem, PySequence_Size
* PySys_GetObject
* PyTraceBack_Here
* PyTuple_GetItem
* PyUnicodeUCS4_DecodeUTF8
* PyWeakref_GetObject
along with various other bugfixes.
================================================
FILE: docs/0.11.rst
================================================
.. Copyright 2012 David Malcolm <dmalcolm@redhat.com>
Copyright 2012 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
.. this covers up to 9bfec18f7eebf9af2dde8b8db132cf97c7d9c17d
0.11
~~~~
Changes to the GCC Python Plugin
================================
The main change in this release is support for compiling the plugin with a
C++ compiler. Recent versions of GCC 4.7 are now built with C++ rather than
C, meaning that plugins must also be built with C++ (since all of GCC's
internal symbols are name-mangled). This release fixes the plugin's
Makefile so that it autodetects whether the plugin needs to be built with a
C or C++ compiler and (I hope) does the right thing automatically. I've also
made the necessary changes to the C source code of the plugin so that it is
compilable as either language.
This should enable the plugin to now be usable with recent builds of gcc
4.7.* (along with gcc 4.6).
The plugin doesn't yet support gcc 4.8 prereleases.
Other fixes:
* there is now a unique :py:class:`gcc.Edge` wrapper for each underlying
edge in GCC's control flow graphs, rather than the old erroneous
behavior of having multiple identical duplicate wrappers.
* fixed missing documentation for :py:class:`gcc.SsaName`, and
:py:class:`gcc.Edge`'s `true_value` and `false_value` flags
Internal improvements to :doc:`gcc-with-cpychecker </cpychecker>`
=================================================================
The CPython static analysis code shipped with the plugin contains a detailed
description of the behavior of the
`CPython API <http://docs.python.org/c-api/>`_ (e.g. which arguments will
lead to a segfault if NULL, and why; the possible outcomes of a call and
their impact on reference-counts; etc).
However, these descriptions were tightly bound to implementation details of
the checker.
This release introduces a new internal API to the analyzer for describing
the possible behaviors of CPython API entrypoints, in an attempt to decouple
these descriptions from the checker, and ports many of the descriptions to
using it.
These changes shouldn't be visible to users of the checker, but should make
future maintenance much easier.
================================================
FILE: docs/0.12.rst
================================================
.. Copyright 2013 David Malcolm <dmalcolm@redhat.com>
Copyright 2013 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
.. this covers up to cfd1a892b8e47ea18b757611c83528b22d85f4ce
0.12
~~~~
Changes to the GCC Python Plugin
================================
GCC 4.8 compatibility
---------------------
This release of the plugin adds support for gcc 4.8 (along with continued
support for gcc 4.7 and gcc 4.6).
gcc-c-api
---------
The source tree contains a new component: gcc-c-api. This provides a
wrapper library `libgcc-c-api.so` that hides much of the details of GCC's
internals (such as the binary layout of structures, and the differences
between GCC 4.6 through 4.8).
I plan for this to eventually be its own project, aiming at providing
a stable API and ABI for working with GCC, once it has proven itself in
the context of the python plugin.
The API provides an XML description of itself, which should greatly simplify
the job of generating bindings for accessing GCC internals from other
languages.
Link-Time Optimization support
------------------------------
The plugin can now be used with GCC's Link-Time Optimization feature (LTO),
allowing whole-program visualizations and analysis.
For example, you can rendering a whole-program "supergraph" of control flow
graphs using this invocation:
.. code-block:: bash
$ ./gcc-with-python \
examples/show-lto-supergraph.py \
-flto \
-flto-partition=none \
tests/examples/lto/input-*.c
which will render a bitmap of the supergraph like this:
.. figure:: sample-supergraph.png
:scale: 50 %
:alt: image of a supergraph
API improvements
----------------
Sane repr() implementations have been added to the following classes:
:py:class:`gcc.CaseLabelExpr`
:py:class:`gcc.GimpleLabel`
:py:class:`gcc.BasicBlock`
:py:class:`gcc.SsaName`
:py:class:`gcc.ArrayRef`
:py:class:`gcc.ComponentRef`
:py:class:`gcc.PointerType`
:py:class:`gcc.IntegerType`
:py:class:`gcc.Location`
:py:class:`gcc.Location` instances can now be compared and sorted. They
are ordered alphabetically by file, then by line number, then by column)
Other fixes
-----------
* the Makefile has a "make install" target (at last)
* prevent forkbomb when running with CC=gcc-with-cpychecker
* fixed memory leak within :py:meth:`gcc.Gimple.walk_tree`
* ensure that the result of :py:attr:`gcc.Cfg.basic_blocks`
can't contain any `None` items (which used to sometimes happen when
certain optimizations had occurred).
* run-test-suite.py now has a --show option, giving more verbose
information on what the test suite is doing
* fix hashing and equality for :py:class:`gcc.Function` and
:py:class:`gcc.Gimple`
* fix :py:meth:`gcc.IntegerCst.__hash__` and ensure it compares sanely
against `int`
* ensure that equivalent :py:class:`gcc.ComponentRef` objects have the
same hash and are equal
* ensure there is a unique gcc.CallgraphEdge for each underlying edge, and
a unique gcc.Cfg for each underlying control flow graph
* add a "label" attribute to gcc.GimpleLabel
* add :py:data:`gcc.GCC_VERSION`
Internal improvements to :doc:`gcc-with-cpychecker </cpychecker>`
=================================================================
* fix exception on pointer comparisons
* fix exception on int-to-float casts
* fix traceback when analyzing a callsite that discards the LHS when an Outcome.returns() a value
* fix two different exceptions when casting an integer value to a pointer
* add example of refcounting bugs to "make demo"
* fix a traceback seen on bogus uses of Py_XDECREF()
================================================
FILE: docs/0.13.rst
================================================
.. Copyright 2014 David Malcolm <dmalcolm@redhat.com>
Copyright 2014 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
.. this covers up to ef48966bc952d2af637e6a34e92846af2c2210bf
0.13
~~~~
The major features in this release are:
* gcc 4.9 compatibility
* a major revamping to the HTML output from gcc-with-cpychecker
New dependency: ``lxml``. The new HTML output format uses lxml
internally.
Changes to the GCC Python Plugin
================================
GCC 4.9 compatibility
---------------------
This release of the plugin adds support for gcc 4.9 (along with continued
support for gcc 4.6, 4.7 and gcc 4.8).
Building against 4.9 requires a GCC 4.9 with the fix for
`GCC bug 63410 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63410>`_ applied.
Other fixes
-----------
* fixed a build-time incompatibility with Python 3.3.0
* various internal bug fixes:
* bug in garbage-collector integration (https://bugzilla.redhat.com/show_bug.cgi?id=864314)
* the test suite is now parallelized (using multiprocessing)
* improvements to Makefile
* improvements to documentation
* add gcc.Location.in_system_header attribute
Improvements to :doc:`gcc-with-cpychecker </cpychecker>`
========================================================
The major improvement to :doc:`gcc-with-cpychecker </cpychecker>` is a big
revamp of the output.
A new "v2" HTML report is available, written to ``SOURCE_NAME.v2.html``
e.g. ``demo.c.v2.html``:
.. figure:: new-html-error-report.png
:alt: screenshot of the new kind of HTML report
The new HTML report is easier to read in the presence of complicated
control flow. It also include links to the API documentation for
calls made to the CPython API.
For both old-style and new-style reports, the wording of the messages has
been clarified:
* Reference-count tracking messages now largely eliminate the
``0 + N where N >=`` gobbledegook, since this was confusing to
everyone (including me). Instead, error reports
talk about references as owned vs borrowed references e.g.
* "refs: 1 owned"
* "refs: 0 owned 1 borrowed"
resorting to ranges::
refs: 0 owned + B borrowed where 1 <= B <= 0x80000000
only where necessary.
* Reports now add ``memory leak:`` and ``future use-after-free:``
prefixes where appropriate, to better indicate the issue.
* Objects are referred to more in terms the user is likely to
understand e.g. ``*dictA`` rather than ``PyDictObject``.
The checker also reports better source locations in its messages
e.g. in the presence of multiple ``return`` statements
(https://fedorahosted.org/gcc-python-plugin/ticket/58).
.. The v2 html output was first added in 0.10, but was "experimental", and
required hacking to access.
Other improvements
------------------
* Add a new test script: `tests/examples/find-global-state`, showing
examples of finding global state in the code being compiled.
* handle :c:func:`PySequence_DelItem`
* fix bug in handling of :c:func:`PyRun_SimpleStringFlags`
* fix issue with handling of :c:func:`PyArg_ParseTuple`
(https://fedorahosted.org/gcc-python-plugin/ticket/50)
* although we don't model the internals of C++ exceptions, fix things so
we don't crash with a traceback in the absense of ``-fno-exceptions``
(https://fedorahosted.org/gcc-python-plugin/ticket/51)
Contributors
============
Thanks to Buck Golemon, Denis Efremov, Philip Herron, and Tom Tromey for
their contributions to this release.
================================================
FILE: docs/0.14.rst
================================================
.. Copyright 2015 David Malcolm <dmalcolm@redhat.com>
Copyright 2015 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
0.14
~~~~
This releases adds support for gcc 5 (along with continued
support for gcc 4.6, 4.7, 4.8 and 4.9).
================================================
FILE: docs/0.15.rst
================================================
.. Copyright 2016 David Malcolm <dmalcolm@redhat.com>
Copyright 2016 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
0.15
~~~~
This releases adds support for gcc 6 (along with continued
support for gcc 4.6, 4.7, 4.8, 4.9 and 5).
Additionally, this release contains the following improvements
(contributed by Tom Tromey; thanks Tom):
* document :py:data:`gcc.PLUGIN_FINISH_TYPE`
* document :py:class:`gcc.EnumeralType`; add 'values' attribute
* add unqualified_equivalent to gcc.Type subclasses
* preserve qualifiers when adding more qualifiers
* fix include for gcc 4.9.2
* handle variadic function types
================================================
FILE: docs/0.16.rst
================================================
.. Copyright 2018 David Malcolm <dmalcolm@redhat.com>
Copyright 2018 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
0.16
~~~~
This releases adds support for gcc 7 and gcc 8 (along with continued
support for gcc 4.6, 4.7, 4.8, 4.9, 5 and 6).
The upstream location for the plugin has moved from fedorahosted.org
to https://github.com/davidmalcolm/gcc-python-plugin
Additionally, this release contains the following improvements:
* add :py:class:`gcc.RichLocation` for GCC 6 onwards
* :py:class:`gcc.Location`
* add :py:attr:`~gcc.Location.caret`, :py:attr:`~gcc.Location.start`,
:py:attr:`~gcc.Location.finish` attributes for GCC 7 onwards
* add :py:meth:`gcc.Location.offset_column` method
================================================
FILE: docs/0.17.rst
================================================
.. Copyright 2019 David Malcolm <dmalcolm@redhat.com>
Copyright 2019 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
0.17
~~~~
This release adds support for gcc 9 (along with continued support for
gcc 4.6, 4.7, 4.8, 4.9, 5, 6, 7, and 8).
Unfortunately, the reference-count checker no longer works for gcc 7
onwards, so it is disabled when embedded in those builds of gcc.
Additionally, this release contains the following improvements:
* the plugin can now be built in a separate build directory from the
source directory (thanks to Tom de Vries)
* gcc-with-cpychecker gained a :option:`--cpychecker-verbose` option
================================================
FILE: docs/0.7.rst
================================================
0.7
~~~
This is a major update to the GCC Python plugin.
The main example script, cpychecker, has seen numerous improvements, and has
now detected many reference-counting bugs in real-world CPython extension code.
The usability and signal:noise ratio is greatly improved over previous releases.
Changes to the GCC Python Plugin
================================
It's now possible to create custom GCC attributes from Python, allowing you to
add custom high-level annotation to a C API, and to write scripts that will
verify these properties. It's also possible to inject preprocessor macros
from Python. Taken together, this allows code like this:
.. literalinclude:: ../tests/examples/attributes-with-macros/input.c
:lines: 22-45
:language: c
Other improvements:
* gcc's debug dump facilities are now exposed via a Python API
* it's now possible to run Python commands in GCC (rather than scripts) using
-fplugin-arg-python-command
* improvements to the "source location" when reporting on an unhandled
Python exception. Amongst other tweaks, it's now possible for a script to
override this, which the cpychecker uses, so that if it can't handle a
particular line of C code, the GCC error report gives that location before
reporting the Python traceback (making debugging much easier).
* "switch" statements are now properly wrapped at the Python level
(gcc.GimpleSwitch)
* C bitfields are now wrapped at the Python level
* gcc.Type instances now have a "sizeof" attribute, and an "attributes"
attribute.
* added a gcc.Gimple.walk_tree method, to make it easy to visit all nodes
relating to a statement
* added a new example: spell-checking all string literals in code
Improvements to "cpychecker"
============================
The "libcpychecker" Python code is a large example of using the plugin: it
extends GCC with code that tries to detect various bugs in CPython extension
modules.
The cpychecker analyzes the paths that can be followed through a C function,
and verifies various properties, including reference-count handling.
As of this release, the pass has found many reference-counting bugs in
real-world code. You can see a list of the bugs that it has detected at:
http://gcc-python-plugin.readthedocs.org/en/latest/success.html
The checker is now *almost* capable of fully handling the C code within the
gcc python plugin itself.
The checker has also been reorganized to (I hope) make it easy to add checking
for other libraries and APIs.
Major rewrite of reference-count tracking
-----------------------------------------
I've rewritten the internals of how reference counts are tracked: the code now
makes a distinction betweeen all of the reference that can be analysed within a
single function, versus all of the other references that may exist in the rest
of the program.
This allows us to know for an object e.g. that the function doesn't directly
own any references, but that the reference count is still > 0 (a "borrowed
reference"), as compared to the case where the function owns a reference, but
we don't know of any in the rest of the program (this is typical when receiving
a "new reference" e.g. from a function call to a constructor).
Within the reference-count checker, we now look for memory locations that
store references to objects. If those locations not on the stack, then the
references they store are now assumed to legally count towards the ob_refcnt
that the function "owns". This is needed in order to correctly handle e.g.
the PyList_SET_ITEM() macro, which directly writes to the list's ob_item field,
"stealing" a reference: we can detect these references, and count them towards
the ob_refcnt value.
The checker can now detect types that look like PyObject subclasses at the C
level (by looking at the top-most fields), and uses this information in various
places.
The checker now exposes custom GCC attributes allowing you to mark APIs that
have non-standard reference-handling behavior:
.. code-block:: c
PyObject *foo(void)
CPYCHECKER_RETURNS_BORROWED_REF;
extern void bar(int i, PyObject *obj, int j, PyObject *other)
CPYCHECKER_STEALS_REFERENCE_TO_ARG(2)
CPYCHECKER_STEALS_REFERENCE_TO_ARG(4);
It also exposes an attribute allowing you to the run-time and compile-time
type information for a Python extension class:
.. code-block:: c
/* Define some PyObject subclass, as both a struct and a typedef */
struct OurObjectStruct {
PyObject_HEAD
/* other fields */
};
typedef struct OurObjectStruct OurExtensionObject;
/*
Declare the PyTypeObject, using the custom attribute to associate it with
the typedef above:
*/
extern PyTypeObject UserDefinedExtension_Type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF("OurExtensionObject");
Function calls with NULL-pointer arguments
------------------------------------------
The checker knows about various CPython API hooks that will crash on NULL
pointer arguments, and will emit warnings when it can determine a path through
the code that will lead to a definite call with a NULL value.
Dereferences of uninitialized pointers
--------------------------------------
The checker will now complain about paths through a function for which it can
prove that an uninitialized pointer will be dereferenced.
Error-reporting improvements
----------------------------
The error-reporting machinery can generate HTML reports: see e.g.:
http://readthedocs.org/docs/gcc-python-plugin/en/latest/cpychecker.html#reference-count-checking
and http://dmalcolm.livejournal.com/6560.html
The checker can now annotate its HTML (and textual) reports with information
showing how some pertinent aspect of the program's state changes during a
particular path through a function.
For example, when reporting on reference-counting errors, the HTML report
showing the flow through the function will now display all changes to an object's
ob_refcnt, together with all changes to what the value ought to be (e.g. due to
pointers being stored to persistent memory locations):
.. figure:: sample-html-error-report.png
:alt: screenshot of the HTML report
Similarly, when reporting on exception-handling errors, it now displays the
"history" of changes to the thread-local exception state.
There's also a debug mode which dumps _everything_ that changes within the
report, which is helpful for debugging the checker itself.
The error report will attempt to use the most representative name for a leaked
object, using a variable name or a C expression fragment as appropriate.
The checker will attempt to combine duplicate error reports, so that it will
only emit one error for all of the various traces of execution that exhibit a
particular reference-counting bug.
Finally, when writing out an HTML report, the path to the HTML is now noted
within gcc's regular stderr messages.
Signal:noise ratio improvements
-------------------------------
To suppress various false-positives that I commonly ran into on real code, the
checker now makes certain assumptions:
* When encountering an unknown function that returns a PyObject*, the
checker assumes that it will either return a new reference to a sane
object (with a sane ob_type), or return NULL and set the thread-local
exception state.
* The checker assumes that a PyObject* argument to a function is non-NULL
and has a >0 refcount, and has a sane ob_type (e.g. with a sane refcount
and tp_dealloc)
* When dereferencing a pointer that it has no knowledge about (e.g. a
pointer field in a structure), the checker now assumes that it's
non-NULL, unless it knows that NULL is a definite possibility i.e. it
optimistically assumes that you know what you're doing (this could be
turned into a command-line option). Note that for the cases where we
know that the pointer can _definitely_ be NULL, an error will still be
reported (e.g. when considering the various possible return values for a
function known to be able to return NULL).
Coverage of the CPython API
---------------------------
I've gone through much of the CPython API, "teaching" the checker about the
reference-count semantics of each API call (and which calls will crash if fed a
NULL pointer). This involves writing a simple fragment of Python code for
each function, which describes the various different affects that the call can
have on the internal state within the callee.
This release adds support for calls to the following:
* _PyObject_New
* Py_{Initialize|Finalize}
* Py_InitModule4
* PyArg_ParseTuple[AndKeywords], and the PY_SSIZE_T_CLEAN variants (only
partial coverage so far: "O", "O!" should work though)
* PyArg_UnpackTuple
* PyBool_FromLong
* Py_BuildValue and the PY_SSIZE_T_CLEAN variant (only partial coverage so
far)
* PyDict_{GetItem,GetItemString,New,SetItem,SetItemString}
* PyErr_{Format,NoMemory,Occurred,Print,PrintEx,SetFromErrno[WithFilename],
SetObject,SetString}
* PyEval_InitThreads
* PyGILState_{Ensure,Release}
* PyImport_{AppendInittab,ImportModule}
* PyInt_{AsLong,FromLong}
* PyList_Append
* PyLong_{FromString,FromVoidPtr}
* PyMem_{Malloc,Free}
* PyModule_Add{IntConstant,Object,StringConstant}
* PyObject_{Call,CallMethod,HasAttrString,IsTrue,Repr,Str}
* PyRun_{SimpleFileExFlags,SimpleStringFlags}
* PySequence_GetItem
* PyString_{AsString,FromFormat,FromString,FromStringAndSize}
* PyStructSequence_{InitType,New}
* PySys_SetObject
* PyTuple_{New,SetItem,Size}
* PyType_{IsSubtype,Ready}
I've been targetting those API entrypoints that I use myself in the plugin;
this is one area which is particularly amenable to patching, for anyone who
wants to get involved. I've also added a (disabled) hook that complains
about Python API entrypoints that weren't explicitly handled, to make it easy
to find gaps in our coverage of the CPython API.
Other user-visible improvments
------------------------------
* There's now a "gcc-with-cpychecker" harness, to make it easier to invoke
GCC with the cpychecker code from e.g. Makefiles
* The checker now respects `__attribute((nonnull))` on function arguments
when detecting NULL pointers
* Handle functions that don't return (e.g. "exit")
* Number the unknown heap regions, to clarify things when there's more than
one
Internal improvements
---------------------
* The cpychecker now has some protection against combinatorial explosion
for functions that have very large numbers of possible routes through
them. For such functions, the checker will emit a note on stderr and
not attempt to find reference-counting bugs in the function.
* The cpychecker is now done as a custom pass (rather than by wiring up a
callback associated with every pass)
* I've tuned the logging within the checker, eliminating some CPU/memory
consumption issues seen when analysing complicated C code. In particular,
the log message arguments are now only expanded when logging is enabled
(previously this was happening all the time).
* Lots of other internal improvements and bug fixes (e.g. handling of arrays
vs pointers, static vs auto local variables, add missing handlers for
various kinds of C expression, lots of work on improving the readability of
error messages)
================================================
FILE: docs/0.8.rst
================================================
.. Copyright 2012 David Malcolm <dmalcolm@redhat.com>
Copyright 2012 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
0.8
~~~
Thanks to David Narvaez and Tom Tromey for their code contributions to this
release.
Changes to the GCC Python Plugin
================================
Initial C++ support
-------------------
This release adds the beginnings of C++ support: :py:class:`gcc.FunctionDecl`
instances now have a "fullname" attribute, along with "is_public",
"is_private", "is_protected", "is_static" booleans.
For example, given this code:
.. code-block:: c++
namespace Example {
struct Coord {
int x;
int y;
};
class Widget {
public:
void set_location(const struct Coord& coord);
};
};
`set_location`'s fullname is::
'void Example::Widget::set_location(const Example::Coord&)'
This is only present when the plugin is invoked from the C++ frontend
(`cc1plus`), gracefully handling the case when we're invoked from other
language frontends.
Similarly, :py:class:`gcc.MethodType` has gained an "argument_types" attribute.
Unconditional warnings
----------------------
The :py:func:`gcc.warning()` function in previous versions of the plugin required an
"option" argument, such as ``gcc.Option('-Wformat')``
It's now possible to emit an unconditional warning, by supplying `None` for
this argument, which is now the default value::
gcc.warning(func.start, 'this is an unconditional warning')
.. code-block:: bash
$ ./gcc-with-python script.py input.c
input.c:25:1: warning: this is an unconditional warning [enabled by default]
which will be an error if `-Werror` is supplied as a command-line argument to gcc:
.. code-block:: bash
$ ./gcc-with-python script.py -Werror input.c
input.c:25:1: error: this is an unconditional warning [-Werror]
Improvements to :doc:`gcc-with-cpychecker </cpychecker>`
========================================================
The :doc:`"libcpychecker" </cpychecker>` Python code is a large example of
using the plugin: it extends GCC with code that tries to detect various bugs
in CPython extension modules.
As of this release, all of the errors emitted by the tool have been converted
to warnings. This should make `gcc-with-cpychecker` more usable as a drop-in
replacement for `gcc`: the first source file with a refcounting error should
no longer terminate the build (unless the program uses ``-Werror``, of
course).
Verification of PyMethodDef tables
----------------------------------
This release adds checking of tables of PyMethodDef initialization values, used
by Python extension modules for binding C functions to Python methods.
The checker will verify that the signatures of the callbacks match the
flags, and that the such tables are NULL terminated::
input.c:48:22: warning: flags do not match callback signature for 'test' within PyMethodDef table
input.c:48:22: note: expected ml_meth callback of type "PyObject (fn)(someobject *, PyObject *)" (2 arguments)
input.c:48:22: note: actual type of underlying callback: struct PyObject * <Tc58> (struct PyObject *, struct PyObject *, struct PyObject *) (3 arguments)
input.c:48:22: note: see http://docs.python.org/c-api/structures.html#PyMethodDef
Coverage of the CPython API
---------------------------
When the checker warns about code that can erroneously pass ``NULL`` to
various CPython API entrypoints which are known to implicitly dereference
those arguments, the checker will now add an explanatory note about why it
is complaining.
For example::
input.c: In function 'test':
input.c:38:33: warning: calling PyString_AsString with NULL (gcc.VarDecl('repr_args')) as argument 1 at input.c:38
input.c:31:15: note: when PyObject_Repr() fails at: repr_args = PyObject_Repr(args);
input.c:38:33: note: PyString_AsString() invokes Py_TYPE() on the pointer via the PyString_Check() macro, thus accessing (NULL)->ob_type
input.c:27:1: note: graphical error report for function 'test' written out to 'input.c.test-refcount-errors.html'
The checker will now verify the argument lists of invocations of
`PyObject_CallFunctionObjArgs
<http://docs.python.org/c-api/object.html#PyObject_CallFunctionObjArgs>`_ and
`PyObject_CallMethodObjArgs
<http://docs.python.org/c-api/object.html#PyObject_CallMethodObjArgs>`_,
checking that all of the arguments are of the correct type
(PyObject* or subclasses), and that the list is NULL-terminated::
input.c: In function 'test':
input.c:33:5: warning: argument 2 had type char[12] * but was expecting a PyObject* (or subclass)
input.c:33:5: warning: arguments to PyObject_CallFunctionObjArgs were not NULL-terminated
This release also adds heuristics for the behavior of the following CPython API
entrypoints:
* PyArg_Parse
* PyCObject_{As,From}VoidPtr
* PyCallable_Check
* PyCapsule_GetPointer
* PyErr_{NewException,SetNone,WarnEx}
* PyEval_CallObjectWithKeywords
* PyEval_{Save,Restore}Thread (and thus the Py_{BEGIN,END}_ALLOW_THREADS
macros)
* PyList_{GetItem,Size}
* PyLong_FromLongLong
* PyMapping_Size
* PyModule_GetDict
* PyObject_AsFileDescriptor
* PyObject_Call{Function,FunctionObjArgs,MethodObjArgs}
* PyObject_Generic{Get,Set}Attr
* PyString_Size
* PyTuple_Pack
* PyUnicode_AsUTF8String
* Py_AtExit
Bug fixes
---------
* gcc-with-cpychecker will now try harder on functions that are too
complicated to fully handle. Previously, when a function was too
complicated for the reference-count tracker to fully analyze, it would give
up, performing no analysis. The checker will now try to obtain at least
some subset of the list of all traces through the function, and analyze
those. It will still note that the function was too complicated to fully
analyze.
Given that we do a depth-first traversal of the tree, and that "success"
transitions are typically visited before "failure" transitions, this means
that it should at least analyze the trace in which all functions calls
succeed, together with traces in which some of the later calls fail.
* the reference-count checker now correctly handles "static" `PyObject*` local
variables: a `static PyObject *` local preserves its value from call to call,
and can thus permanently own a reference.
Fixes a false-positive seen in psycopg2-2.4.2
(`psycopg/psycopgmodule.c:psyco_GetDecimalType`)
where the refcount checker erroneously reported that a reference was leaked.
* the checker for Py_BuildValue("O") (and "S" and "N") was being too strict,
requiring a (PyObject*). Although it's not explicitly documented, it's
clear that these can also accept pointers to any PyObject subclass.
Fixes a false positive seen when running gcc-with-cpychecker on
coverage-3.5.1b1.tar.gz, in which `coverage/tracer.c:Tracer_trace` passes a
PyFrameObject* as an argument to such a call.
* the reference-count checker now correctly suppresses reports about "leaks"
for traces that call a function that never return (such as `abort()`).
Fixes a false positive seen in rpm-4.9.1.2 in a handler for fatal errors:
(in python/rpmts-py.c:die) where the checker erroneously reported that a
reference was leaked.
* `tp_iternext` callbacks are allowed to return NULL without setting an
exception. The reference-count checker will now notice if a function is
used in such a role, and suppress warnings about such behavior.
* fixed various Python tracebacks (tickets
`#14 <https://fedorahosted.org/gcc-python-plugin/ticket/14>`_,
`#19 <https://fedorahosted.org/gcc-python-plugin/ticket/19>`_,
`#20 <https://fedorahosted.org/gcc-python-plugin/ticket/20>`_,
`#22 <https://fedorahosted.org/gcc-python-plugin/ticket/22>`_,
`#23 <https://fedorahosted.org/gcc-python-plugin/ticket/23>`_,
`#24 <https://fedorahosted.org/gcc-python-plugin/ticket/24>`_,
`#25 <https://fedorahosted.org/gcc-python-plugin/ticket/25>`_)
* various other fixes
================================================
FILE: docs/0.9.rst
================================================
.. Copyright 2012 David Malcolm <dmalcolm@redhat.com>
Copyright 2012 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
.. covers up to 4642a564e03c9e2c8114bca206205ad9c8fbc308
0.9
~~~
Changes to the GCC Python Plugin
================================
The plugin now works with GCC 4.7 prereleases (ticket `#21 <https://fedorahosted.org/gcc-python-plugin/ticket/21>`_).
The plugin is now integrated with GCC's garbage collector: Python wrapper
objects keep their underlying GCC objects alive when GCC's garbage collector
runs, preventing segfaults that could occur if the underlying objects were
swept away from under us
(ticket `#1 <https://fedorahosted.org/gcc-python-plugin/ticket/1>`_).
It's now possible to attach Python callbacks to more GCC events:
:py:data:`gcc.PLUGIN_FINISH`, :py:data:`gcc.PLUGIN_GGC_START`,
:py:data:`gcc.PLUGIN_GGC_MARKING`, :py:data:`gcc.PLUGIN_GGC_FINISH`,
:py:data:`gcc.PLUGIN_FINISH_DECL` (gcc 4.7)
:py:class:`gcc.ArrayType` has gained a "range" attribute, allowing scripts
to detect out-of-bounds conditions in array-handling.
A number of memory leaks were fixed: these were found by
`running the plugin on itself
<http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=4642a564e03c9e2c8114bca206205ad9c8fbc308>`_.
Various documentation improvements
(ticket `#6 <https://fedorahosted.org/gcc-python-plugin/ticket/6>`_,
ticket `#31 <https://fedorahosted.org/gcc-python-plugin/ticket/31>`_).
Improvements to :doc:`gcc-with-cpychecker </cpychecker>`
========================================================
The :doc:`gcc-with-cpychecker </cpychecker>` tool has received some deep
internal improvements in this release.
The logic for analyzing the outcome of comparisons has been rewritten for this
release, fixing some significant bugs that could lead to the analyzer
incorrectly deciding whether or not a block of code was reachable.
Similarly, the logic for detecting loops has been rewritten, elimininating a
bug in which the checker would prematurely stop analyzing loops with
complicated termination conditions, and not analyze the body of the loop.
Doing so extended the reach of the checker, and enabled it to find the memory
leaks referred to above.
In addition, the checker now emits more detailed information on the ranges of
possible values it's considering when a comparison occurs against an unknown
value::
input.c: In function 'test':
input.c:41:5: warning: comparison against uninitialized data (item) at input.c:41 [enabled by default]
input.c:34:12: note: when PyList_New() succeeds at: result = PyList_New(len);
input.c:35:8: note: taking False path at: if (!result) {
input.c:39:12: note: reaching: for (i = 0; i < len; i++) {
input.c:39:5: note: when considering range: 1 <= value <= 0x7fffffff at: for (i = 0; i < len; i++) {
input.c:39:5: note: taking True path at: for (i = 0; i < len; i++) {
input.c:41:5: note: reaching: if (!item) {
The checker should do a better job of identifying PyObject subclasses.
Previously it was treating any struct beginning with "ob_refcnt" and "ob_type"
as a Python object (with some tweaks for python 3 and debug builds). It now
also covers structs that begin with a field that's a PyObject (or subclass),
since these are likely to also be PyObject subclasses.
Usage of deallocated memory
---------------------------
Previously, the checker would warn about paths through a function that could
return a pointer to deallocated memory, or which tried to read through such
a pointer. With this release, the checker will now also warn about paths
through a function in which a pointer to deallocated memory is passed to a
function.
For example, given this buggy code:
.. code-block:: c
extern void some_function(PyObject *);
void
test(PyObject *self, PyObject *args)
{
/* Create an object: */
PyObject *tmp = PyLong_FromLong(0x1000);
if (!tmp) {
return;
}
/*
Now decref the object. Depending on what other references are owned
on the object, it can reach a refcount of zero, and thus be deallocated:
*/
Py_DECREF(tmp);
/* BUG: the object being returned may have been deallocated */
some_function(tmp);
}
the checker will emit this warning::
input.c: In function 'test':
input.c:45: warning: passing pointer to deallocated memory as argument 1 of function at input.c:45: memory deallocated at input.c:42 [enabled by default]
input.c:32: note: when PyLong_FromLong() succeeds at: PyObject *tmp = PyLong_FromLong(0x1000);
input.c:34: note: taking False path at: if (!tmp) {
input.c:42: note: reaching: Py_DECREF(tmp);
input.c:42: note: when taking False path at: Py_DECREF(tmp);
input.c:42: note: reaching: Py_DECREF(tmp);
input.c:42: note: calling tp_dealloc on PyLongObject allocated at input.c:32 at: Py_DECREF(tmp);
input.c:45: note: reaching: foo(tmp);
input.c:30: note: graphical error report for function 'passing_dead_object_to_function' written out to 'input.c.test-refcount-errors.html'
Coverage of the CPython API
---------------------------
This release adds heuristics for the behavior of the following CPython API
entrypoints:
* PyString_Concat
* PyString_ConcatAndDel
along with various other bugfixes and documentation improvements.
..
================================================
FILE: docs/Makefile
================================================
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make a Texinfo document"
@echo " info to make an info page"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/gcc-python-plugin.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/gcc-python-plugin.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/gcc-python-plugin"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/gcc-python-plugin"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo pages are in $(BUILDDIR)/texinfo."
info: texinfo
cd $(BUILDDIR)/texinfo && $(MAKE) info
@echo
@echo "Build finished. The info pages are in $(BUILDDIR)/texinfo."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
================================================
FILE: docs/appendices.rst
================================================
.. Copyright 2012 David Malcolm <dmalcolm@redhat.com>
Copyright 2012 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
Appendices
==========
The following contain tables of reference material that may be useful
when writing scripts.
.. toctree::
tables-of-passes.rst
operators.rst
================================================
FILE: docs/attributes.rst
================================================
.. Copyright 2011 David Malcolm <dmalcolm@redhat.com>
Copyright 2011 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
Creating custom GCC attributes
==============================
GNU C supports a non-standard `__attribute__(()) syntax
<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_ for marking
declarations with additional information that may be of interest to the
optimizer, and for checking the correctness of the code.
The GCC Python plugin allows you to create custom attributes, which may
be of use to your scripts: you can use this to annotate C code with additional
information. For example, you could create a custom attribute for functions
describing the interaction of a function on mutex objects:
.. code-block:: c
extern void some_function(void)
__attribute__((claims_mutex("io")));
extern void some_other_function(void)
__attribute__((releases_mutex("io")));
and use this in a custom code-checker.
Custom attributes can take string and integer parameters. For example, the
above custom attributes take a single string parameter. A custom attribute can
take more than one parameter, or none at all.
To create custom attributes from Python, you need to wire up a callback
response to the :py:data:`gcc.PLUGIN_ATTRIBUTES` event:
.. literalinclude:: ../tests/examples/attributes/script.py
:lines: 39-40
:language: python
This callback should then call :py:func:`gcc.register_attribute` to associate
the name of the attribute with a Python callback to be called when the
attribute is encountered in C code.
.. py:function:: gcc.register_attribute(name, min_length, max_length, \
decl_required, type_required, \
function_type_required, \
callable)
Registers a new GCC attribute with the given *name* , usable in C source
code via ``__attribute__(())``.
:param name: the name of the new attribute
:type name: str
:param min_length: the minimum number of arguments expected when the attribute is used
:type min_length: int
:param max_length: the maximum number of arguments expected when the
attribute is used (-1 for no maximum)
:type max_length: int
:param decl_required:
:type decl_required:
:param type_required:
:type type_required:
:param function_type_required:
:type function_type_required:
:param callable: the callback to be invoked when the attribute is seen
:type callable: a callable object, such as a function
In this example, we can simply print when the attribute is seen, to verify that
the callback mechanism is working:
.. literalinclude:: ../tests/examples/attributes/script.py
:lines: 22-36
:language: python
Putting it all together, here is an example Python script for the plugin:
.. literalinclude:: ../tests/examples/attributes/script.py
:lines: 18-
:language: python
Compiling this test C source file:
.. literalinclude:: ../tests/examples/attributes/input.c
:lines: 22-29
:language: c
leads to this output from the script:
.. literalinclude:: ../tests/examples/attributes/stdout.txt
:language: bash
Using the preprocessor to guard attribute usage
-----------------------------------------------
Unfortunately, the above C code will only work when it is compiled with the
Python script that adds the custom attributes.
You can avoid this by using :py:func:`gcc.define_macro()` to pre-define a
preprocessor name (e.g. "WITH_ATTRIBUTE_CLAIMS_MUTEX") at the same time as when
you define the attribute:
.. literalinclude:: ../tests/examples/attributes-with-macros/script.py
:lines: 18-
:language: python
This way the user can write this C code instead, and have it work both with
and without the Python script:
.. literalinclude:: ../tests/examples/attributes-with-macros/input.c
:lines: 22-45
:language: c
giving this output from the script:
.. literalinclude:: ../tests/examples/attributes-with-macros/stdout.txt
:language: bash
================================================
FILE: docs/basics.rst
================================================
.. Copyright 2011-2012, 2017 David Malcolm <dmalcolm@redhat.com>
Copyright 2011-2012, 2017 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
.. For notes on how to document Python in RST form, see e.g.:
.. http://sphinx.pocoo.org/domains.html#the-python-domain
Requirements
============
The plugin has the following requirements:
* GCC: 4.6 or later (it uses APIs that weren't exposed to plugins in 4.5)
* Python: requires 2.7 or 3.2 or later
* "six": The libcpychecker code uses the "six" Python compatibility library to
smooth over Python 2 vs Python 3 differences, both at build-time and
run-time:
http://pypi.python.org/pypi/six/
* "pygments": The libcpychecker code uses the "pygments" Python
syntax-highlighting library when writing out error reports:
http://pygments.org/
* "lxml": The libcpychecker code uses the "lxml" internally when writing
out error reports.
* graphviz: many of the interesting examples use "dot" to draw diagrams
(e.g. control-flow graphs), so it's worth having graphviz installed.
Prebuilt-packages
=================
Various distributions ship with pre-built copies of the plugin. If you're
using Fedora, you can install the plugin via RPM on Fedora 16 onwards using:
.. code-block:: bash
yum install gcc-python2-plugin
as root for the Python 2 build of the plugin, or:
.. code-block:: bash
yum install gcc-python3-plugin
for the Python 3 build of the plugin.
On Gentoo, use `layman` to add the `dMaggot` overlay and `emerge` the
`gcc-python-plugin` package. This will build the plugin for Python 2 and
Python 3 should you have both of them installed in your system. A live
ebuild is also provided to install the plugin from git sources.
Building the plugin from source
===============================
Build-time dependencies
-----------------------
If you plan to build the plugin from scratch, you'll need the build-time
dependencies.
On a Fedora box you can install them by running the following as root:
.. code-block:: bash
yum install gcc-plugin-devel python-devel python-six python-pygments graphviz
for building against Python 2, or:
.. code-block:: bash
yum install gcc-plugin-devel python3-devel python3-six python3-pygments graphviz
when building for Python 3.
Building the code
------------------
You can obtain the source code from git by using::
$ git clone git@github.com:davidmalcolm/gcc-python-plugin.git
To build the plugin, run:
.. code-block:: bash
make plugin
To build the plugin and run the selftests, run:
.. code-block:: bash
make
You can also use::
make demo
to demonstrate the new compiler errors.
By default, the `Makefile` builds the plugin using the first ``python-config``
tool found in `$PATH` (e.g. `/usr/bin/python-config`), which is typically the
system copy of Python 2. You can override this (e.g. to build against
Python 3) by overriding the `PYTHON` and `PYTHON_CONFIG` Makefile variables
with:
.. code-block:: bash
make PYTHON=python3 PYTHON_CONFIG=python3-config
There isn't a well-defined process yet for installing the plugin (though the
rpm specfile in the source tree contains some work-in-progress towards this).
Some notes on GCC plugins can be seen at http://gcc.gnu.org/wiki/plugins and
http://gcc.gnu.org/onlinedocs/gccint/Plugins.html
.. note:: Unfortunately, the layout of the header files for GCC plugin
development has changed somewhat between different GCC releases. In
particular, older builds of GCC flattened the "c-family" directory in the
installed plugin headers.
This was fixed in this GCC commit:
http://gcc.gnu.org/viewcvs?view=revision&revision=176741
So if you're using an earlier build of GCC using the old layout you'll need
to apply the following patch (reversed with "-R") to the plugin's source
tree to get it to compile:
.. code-block:: bash
$ git show 215730cbec40a6fe482fabb7f1ecc3d747f1b5d2 | patch -p1 -R
If you have a way to make the plugin's source work with either layout,
please email the plugin's `mailing list
<https://fedorahosted.org/mailman/listinfo/gcc-python-plugin/>`_
Basic usage of the plugin
=========================
Once you've built the plugin, you can invoke a Python script like this:
.. code-block:: bash
gcc -fplugin=./python.so -fplugin-arg-python-script=PATH_TO_SCRIPT.py OTHER_ARGS
and have it run your script as the plugin starts up.
Alternatively, you can run a one-shot Python command like this:
.. code-block:: bash
gcc -fplugin=./python.so -fplugin-arg-python-command="python code" OTHER_ARGS
such as:
.. code-block:: bash
gcc -fplugin=./python.so -fplugin-arg-python-command="import sys; print(sys.path)" OTHER_ARGS
The plugin automatically adds the absolute path to its own directory to the
end of its `sys.path`, so that it can find support modules, such as gccutils.py
and `libcpychecker`.
There is also a helper script, `gcc-with-python`, which expects a python script
as its first argument, then regular gcc arguments:
.. code-block:: bash
./gcc-with-python PATH_TO_SCRIPT.py other args follow
For example, this command will use graphviz to draw how GCC "sees" the
internals of each function in `test.c` (within its SSA representation):
.. code-block:: bash
./gcc-with-python examples/show-ssa.py test.c
Most of the rest of this document describes the Python API visible for
scripting.
The plugin GCC's various types as Python objects, within a "gcc" module. You
can see the API by running the following within a script::
import gcc
help(gcc)
To make this easier, there's a script to do this for you:
.. code-block:: bash
./gcc-python-docs
from where you can review the built-in documentation strings (this document
may be easier to follow though).
The exact API is still in flux: and may well change (this is an early version
of the code; we may have to change things as GCC changes in future releases
also).
Debugging your script
---------------------
You can place a forced breakpoint in your script using this standard Python
one-liner::
import pdb; pdb.set_trace()
If Python reaches this location it will interrupt the compile and put you
within the `pdb` interactive debugger, from where you can investigate.
See http://docs.python.org/library/pdb.html#debugger-commands for more
information.
If an exception occurs during Python code, and isn't handled by a try/except
before returning into the plugin, the plugin prints the traceback to stderr and
treats it as an error:
.. code-block:: pytb
/home/david/test.c: In function ‘main’:
/home/david/test.c:28:1: error: Unhandled Python exception raised within callback
Traceback (most recent call last):
File "test.py", line 38, in my_pass_execution_callback
dot = gccutils.tree_to_dot(fun)
NameError: global name 'gccutils' is not defined
(In this case, it was a missing `import` statement in the script)
GCC reports errors at a particular location within the source code. For an
unhandled exception such as the one above, by default, the plugin reports
the error as occurring as the top of the current source function (or the last
location within the current source file for passes and callbacks that aren't
associated with a function).
You can override this using gcc.set_location:
.. py:function:: gcc.set_location(loc)
Temporarily overrides the error-reporting location, so that if an exception
occurs, it will use this `gcc.Location`, rather than the default. This may
be of use when debugging tracebacks from scripts. The location is reset
each time after returning from Python back to the plugin, after printing
any traceback.
Accessing parameters
--------------------
.. py:data:: gcc.argument_dict
Exposes the arguments passed to the plugin as a dictionary.
For example, running:
.. code-block:: bash
gcc -fplugin=python.so \
-fplugin-arg-python-script=test.py \
-fplugin-arg-python-foo=bar
with `test.py` containing::
import gcc
print(gcc.argument_dict)
has output::
{'script': 'test.py', 'foo': 'bar'}
.. py:data:: gcc.argument_tuple
Exposes the arguments passed to the plugin as a tuple of (key, value) pairs,
so you have ordering. (Probably worth removing, and replacing
:py:data:`argument_dict` with an OrderedDict instead; what about
duplicate args though?)
Adding new passes to the compiler
---------------------------------
You can create new compiler passes by subclassing the appropriate
:py:class:`gcc.Pass` subclass. For example, here's how to wire up a new pass
that displays the control flow graph of each function:
.. literalinclude:: ../examples/show-gimple.py
:lines: 19-
:language: python
For more information, see :ref:`creating-new-passes`
Wiring up callbacks
-------------------
The other way to write scripts is to register callback functions
to be called when various events happen during compilation, such as using
:py:data:`gcc.PLUGIN_PASS_EXECUTION` to piggyback off of an existing GCC pass.
.. literalinclude:: ../examples/show-passes.py
:lines: 19-
:language: python
For more information, see :ref:`callbacks`
Global data access
==================
.. py:function:: gcc.get_variables()
Get all variables in this compilation unit as a list of
:py:class:`gcc.Variable`
.. py:class:: gcc.Variable
Wrapper around GCC's `struct varpool_node`, representing a variable in
the code being compiled.
.. py:attribute:: decl
The declaration of this variable, as a :py:class:`gcc.Tree`
.. py:function:: gccutils.get_variables_as_dict()
Get a dictionary of all variables, where the keys are the variable names
(as strings), and the values are instances of :py:class:`gcc.Variable`
.. py:function:: gcc.maybe_get_identifier(str)
Get the :py:class:`gcc.IdentifierNode` with this name, if it exists,
otherwise None. (However, after the front-end has run, the identifier
node may no longer point at anything useful to you; see
:py:func:`gccutils.get_global_typedef` for an example of working
around this)
.. py:function:: gcc.get_translation_units()
Get a list of all :py:class:`gcc.TranslationUnitDecl` for the compilation
units within this invocation of GCC (that's "source code files" for the
layperson).
.. py:class:: gcc.TranslationUnitDecl
Subclass of :py:class:`gcc.Tree` representing a compilation unit
.. py:attribute:: block
The :py:class:`gcc.Block` representing global scope within this
source file.
.. py:attribute:: language
The source language of this translation unit, as a string
(e.g. "GNU C")
.. py:function:: gcc.get_global_namespace()
C++ only: locate the :py:class:`gcc.NamespaceDecl` for the global
namespace (a.k.a. "::")
.. py:function:: gccutils.get_global_typedef(name)
Given a string `name`, look for a C/C++ `typedef` in global scope with
that name, returning it as a :py:class:`gcc.TypeDecl`, or None if it
wasn't found
.. py:function:: gccutils.get_global_vardecl_by_name(name)
Given a string `name`, look for a C/C++ variable in global scope with
that name, returning it as a :py:class:`gcc.VarDecl`, or None if it
wasn't found
.. py:function:: gccutils.get_field_by_name(decl, name)
Given one of a :py:class:`gcc.RecordType`, :py:class:`gcc.UnionType`, or
:py:class:`gcc.QualUnionType`, along with a string `name`, look for a
field with that name within the given struct or union, returning it as a
:py:class:`gcc.FieldDecl`, or None if it wasn't found
================================================
FILE: docs/callbacks.rst
================================================
.. Copyright 2012 David Malcolm <dmalcolm@redhat.com>
Copyright 2012 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
.. _callbacks:
Working with callbacks
======================
One way to work with GCC from the Python plugin is via callbacks. It's possible
to register callback functions, which will be called when various events happen
during compilation.
For example, it's possible to piggyback off of an existing GCC pass by using
:py:data:`gcc.PLUGIN_PASS_EXECUTION` to piggyback off of an existing GCC pass.
.. py:function:: gcc.register_callback(event_id, function, [extraargs,] **kwargs)
Wire up a python function as a callback. It will be called when the given
event occurs during compilation. For some events, the callback will be
called just once; for other events, the callback is called once per
function within the source code being compiled. In the latter case, the
plugin passes a :py:class:`gcc.Function` instance as a parameter to your
callback, so that you can work on it::
import gcc
def my_pass_execution_callback(*args, **kwargs):
print('my_pass_execution_callback was called: args=%r kwargs=%r'
% (args, kwargs))
gcc.register_callback(gcc.PLUGIN_PASS_EXECUTION,
my_pass_execution_callback)
The exact arguments passed to your callback vary: consult the documentation
for the particular event you are wiring up to (see below).
You can pass additional arguments when registering the callback - they will
be passed to the callback after any normal arguments. This is denoted in the
descriptions of events below by `*extraargs`.
You can also supply keyword arguments: they will be passed on as keyword
arguments to the callback. This is denoted in the description of events
below by `**kwargs`.
The various events are exposed as constants within the `gcc` module and
directly wrap GCC's plugin mechanism.
The following GCC events are currently usable from the Python plugin via
:py:func:`gcc.register_callback()`:
=============================================== =========
ID Meaning
=============================================== =========
:py:data:`gcc.PLUGIN_ATTRIBUTES` For :doc:`creating custom GCC attributes <attributes>`
:py:data:`gcc.PLUGIN_PRE_GENERICIZE` For working with the AST in the C and C++ frontends
:py:data:`gcc.PLUGIN_PASS_EXECUTION` Called before each pass is executed
:py:data:`gcc.PLUGIN_FINISH_UNIT` At the end of working with a translation unit (aka source file)
:py:data:`gcc.PLUGIN_FINISH_TYPE` After a type has been parsed
:py:data:`gcc.PLUGIN_FINISH_DECL` After a declaration has been parsed (GCC 4.7 or later)
:py:data:`gcc.PLUGIN_FINISH` Called before GCC exits
=============================================== =========
.. py:data:: gcc.PLUGIN_ATTRIBUTES
Called when GCC is creating attributes for use with its non-standard
`__attribute__(()) syntax
<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_.
If you want to create custom GCC attributes, you should register a callback
on this event and call :py:func:`gcc.register_attribute()` from within that
callback, so that they are created at the same time as the GCC's built-in
attributes.
No arguments are passed to your callback other than those that you supply
yourself when registering it:
(`*extraargs`, `**kwargs`)
See :doc:`creating custom GCC attributes <attributes>` for examples and
more information.
.. py:data:: gcc.PLUGIN_PASS_EXECUTION
Called when GCC is about to run one of its passes.
Arguments passed to the callback are:
(`ps`, `fun`, `*extraargs`, `**kwargs`)
where `ps` is a :py:class:`gcc.Pass` and `fun` is a :py:class:`gcc.Function`.
Your callback will typically be called many times: there are many passes,
and each can be invoked zero or more times per function (in the code being
compiled)
More precisely, some passes have a "gate check": the pass first checks a
condition, and only executes if the condition is true.
Any callback registered with `gcc.PLUGIN_PASS_EXECUTION` will get called
if this condition succeeds.
The actual work of the pass is done after the callbacks return.
In pseudocode::
if pass.has_gate_condition:
if !pass.test_gate_condition():
return
invoke_all_callbacks()
actually_do_the_pass()
For passes working on individual functions, all of the above is done
per-function.
To connect to a specific pass, you can simply add a conditional based on the
name of the pass::
import gcc
def my_callback(ps, fun):
if ps.name != '*warn_function_return':
# Not the pass we want
return
# Do something here
print(fun.decl.name)
gcc.register_callback(gcc.PLUGIN_PASS_EXECUTION,
my_callback)
.. py:data:: gcc.PLUGIN_PRE_GENERICIZE
Arguments passed to the callback are:
(`fndecl`, `*extraargs`, `**kwargs`)
where `fndecl` is a :py:class:`gcc.Tree` representing a function declaration
within the source code being compiled.
.. py:data:: gcc.PLUGIN_FINISH_UNIT
Called when GCC has finished compiling a particular translation unit.
Arguments passed to the callback are:
(`*extraargs`, `**kwargs`)
.. py:data:: gcc.PLUGIN_FINISH_DECL
.. note:: Only available in GCC 4.7 onwards.
Called when GCC has finished compiling a declaration (variables,
functions, parameters to functions, types, etc)
Arguments passed to the callback are:
(`decl`, `*extraargs`, `**kwargs`)
where `decl` is a :py:class:`gcc.Declaration`.
.. py:data:: gcc.PLUGIN_FINISH_TYPE
Called when GCC has finished parsing a type. Arguments to the
callback are:
(`type`, `*extraargs`, `**kwargs`)
where `type` is a :py:class:`gcc.Type`.
.. py:data:: gcc.PLUGIN_FINISH
Called before GCC exits.
Arguments passed to the callback are:
(`*extraargs`, `**kwargs`)
The remaining GCC events aren't yet usable from the plugin; an attempt to
register a callback on them will lead to an exception being raised. Email
the `gcc-python-plugin's mailing list
<https://fedorahosted.org/mailman/listinfo/gcc-python-plugin/>`_ if you're
interested in working with these):
=============================================== =========
ID Meaning
=============================================== =========
:py:data:`gcc.PLUGIN_PASS_MANAGER_SETUP` To hook into pass manager
:py:data:`gcc.PLUGIN_INFO` Information about the plugin
:py:data:`gcc.PLUGIN_GGC_START` For interacting with GCC's garbage collector
:py:data:`gcc.PLUGIN_GGC_MARKING` (ditto)
:py:data:`gcc.PLUGIN_GGC_END` (ditto)
:py:data:`gcc.PLUGIN_REGISTER_GGC_ROOTS` (ditto)
:py:data:`gcc.PLUGIN_REGISTER_GGC_CACHES` (ditto)
:py:data:`gcc.PLUGIN_START_UNIT` Called before processing a translation unit (aka source file)
:py:data:`gcc.PLUGIN_PRAGMAS` For registering pragmas
:py:data:`gcc.PLUGIN_ALL_PASSES_START` Called before the first pass of the :ref:`"all other passes" gcc.Pass catchall <all_passes>`
:py:data:`gcc.PLUGIN_ALL_PASSES_END` Called after last pass of the :ref:`"all other passes" gcc.Pass catchall <all_passes>`
:py:data:`gcc.PLUGIN_ALL_IPA_PASSES_START` Called before the first IPA pass
:py:data:`gcc.PLUGIN_ALL_IPA_PASSES_END` Called after last IPA pass
:py:data:`gcc.PLUGIN_OVERRIDE_GATE` Provides a way to disable a built-in pass
:py:data:`gcc.PLUGIN_EARLY_GIMPLE_PASSES_START`
:py:data:`gcc.PLUGIN_EARLY_GIMPLE_PASSES_END`
:py:data:`gcc.PLUGIN_NEW_PASS`
=============================================== =========
.. Notes on the other callback events
.. py:data:: gcc.PLUGIN_PRAGMAS
gcc_data=0x0
Called from: c_common_init () at ../../gcc/c-family/c-opts.c:1052
.. py:data:: gcc.PLUGIN_START_UNIT
gcc_data=0x0
Called from: compile_file () at ../../gcc/toplev.c:573
.. py:data:: gcc.PLUGIN_PRE_GENERICIZE
gcc_data is: tree fndecl;
Called from: finish_function () at ../../gcc/c-decl.c:8323
.. py:data:: gcc.PLUGIN_OVERRIDE_GATE
gcc_data::
&gate_status
bool gate_status;
Called from : execute_one_pass (pass=0x1011340) at ../../gcc/passes.c:1520
.. py:data:: gcc.PLUGIN_ALL_IPA_PASSES_START
gcc_data=0x0
Called from: ipa_passes () at ../../gcc/cgraphunit.c:1779
.. py:data:: gcc.PLUGIN_EARLY_GIMPLE_PASSES_START
gcc_data=0x0
Called from: execute_ipa_pass_list (pass=0x1011fa0) at ../../gcc/passes.c:1927
.. py:data:: gcc.PLUGIN_EARLY_GIMPLE_PASSES_END
gcc_data=0x0
Called from: execute_ipa_pass_list (pass=0x1011fa0) at ../../gcc/passes.c:1930
.. py:data:: gcc.PLUGIN_ALL_IPA_PASSES_END
gcc_data=0x0
Called from: ipa_passes () at ../../gcc/cgraphunit.c:1821
.. py:data:: gcc.PLUGIN_ALL_PASSES_START
gcc_data=0x0
Called from: tree_rest_of_compilation (fndecl=0x7ffff16b1f00) at ../../gcc/tree-optimize.c:420
.. py:data:: gcc.PLUGIN_ALL_PASSES_END
gcc_data=0x0
Called from: tree_rest_of_compilation (fndecl=0x7ffff16b1f00) at ../../gcc/tree-optimize.c:425
.. py:data:: gcc.PLUGIN_FINISH
gcc_data=0x0
Called from: toplev_main (argc=17, argv=0x7fffffffdfc8) at ../../gcc/toplev.c:1970
.. py:data:: gcc.PLUGIN_FINISH_TYPE
gcc_data=tree
Called from c_parser_declspecs (parser=0x7fffef559730, specs=0x15296d0, scspec_ok=1 '\001', typespec_ok=1 '\001', start_attr_ok=<optimized out>, la=cla_nonabstract_decl) at ../../gcc/c-parser.c:2111
.. py:data:: gcc.PLUGIN_PRAGMA
gcc_data=0x0
Called from: init_pragma at ../../gcc/c-family/c-pragma.c:1321
to "Allow plugins to register their own pragmas."
================================================
FILE: docs/callgraph.rst
================================================
.. Copyright 2011 David Malcolm <dmalcolm@redhat.com>
Copyright 2011 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
Interprocedural analysis (IPA)
==============================
GCC builds a "call graph", recording which functions call which other
functions, and it uses this for various optimizations.
It is constructed by the `"*build_cgraph_edges"` pass.
In case it's of interest, it is available via the following Python API:
.. py:function:: gcc.get_callgraph_nodes()
Get a list of all :py:class:`gcc.CallgraphNode` instances
.. py:function:: gccutils.callgraph_to_dot()
Return the GraphViz source for a rendering of the current callgraph, as a
string.
Here's an example of such a rendering:
.. figure:: sample-callgraph.png
:alt: image of a call graph
.. py:class:: gcc.CallgraphNode
.. py:attribute:: decl
The :py:class:`gcc.FunctionDecl` for this node within the callgraph
.. py:attribute:: callees
The function calls made by this function, as a list of :py:class:`gcc.CallgraphEdge` instances
.. py:attribute:: callers
The places that call this function, as a list of :py:class:`gcc.CallgraphEdge` instances
Internally, this wraps a `struct cgraph_node *`
.. py:class:: gcc.CallgraphEdge
.. py:attribute:: caller
The function that makes this call, as a :py:class:`gcc.CallgraphNode`
.. py:attribute:: callee
The function that is called here, as a :py:class:`gcc.CallgraphNode`
.. py:attribute:: call_stmt
The :py:class:`gcc.GimpleCall` statememt for the function call
Internally, this wraps a `struct cgraph_edge *`
================================================
FILE: docs/cfg.rst
================================================
.. Copyright 2011 David Malcolm <dmalcolm@redhat.com>
Copyright 2011 Red Hat, Inc.
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
Working with functions and control flow graphs
==============================================
Many of the plugin events are called for each function within the source code
being compiled. Each time, the plugin passes a :py:class:`gcc.Function`
instance as a parameter to your callback, so that you can work on it.
You can get at the control flow graph of a :py:class:`gcc.Function` via its
``cfg`` attribute. This is an instance of :py:class:`gcc.Cfg`.
.. py:class:: gcc.Function
Wrapper around one of GCC's ``struct function *``
.. py:attribute:: cfg
An instance of :py:class:`gcc.Cfg` for this function (or None during early
passes)
.. py:attribute:: decl
The declaration of this function, as a :py:class:`gcc.FunctionDecl`
.. py:attribute:: local_decls
List of :py:class:`gcc.VarDecl` for the function's local variables. It
does not contain arguments; for those see the `arguments` property of
the function's `decl`.
Note that for locals with initializers, `initial` only seems to get set
on those `local_decls` that are static variables. For other locals, it
appears that you have to go into the gimple representation to locate
assignments.
.. py:attribute:: start
The :py:class:`gcc.Location` of the beginning of the function
.. py:attribute:: end
The :py:class:`gcc.Location` of the end of the function
.. py:attribute:: funcdef_no
Integer: a sequence number for profiling, debugging, etc.
.. py:class:: gcc.Cfg
A ``gcc.Cfg`` is a wrapper around GCC's `struct control_flow_graph`.
.. py:attribute:: basic_blocks
List of :py:class:`gcc.BasicBlock`, giving all of the basic blocks within
this CFG
.. py:attribute:: entry
Instance of :py:class:`gcc.BasicBlock`: the entrypoint for this CFG
.. py:attribute:: exit
Instance of :py:class:`gcc.BasicBlock`: the final one within this CFG
.. py:method:: get_block_for_label(labeldecl)
Given a :py:class:`gcc.LabelDecl`, get the corresponding
:py:class:`gcc.BasicBlock`
You can use ``gccutils.cfg_to_dot`` to render a gcc.Cfg as a graphviz
diagram. It will render the diagram, showing each basic block, with
source code on the left-hand side, interleaved with the "gimple"
representation on the right-hand side. Each block is labelled with its
index, and edges are labelled with appropriate flags.
For example, given this sample C code:
.. literalinclude:: ../test.c
:lines: 33-48
:language: c
then the following Python code::
dot = gccutils.cfg_to_dot(fun.cfg)
gccutils.invoke_dot(dot)
will render a CFG bitmap like this:
.. figure:: sample-gimple-cfg.png
:scale: 50 %
:alt: image of a control flow graph
.. py:class:: gcc.BasicBlock
A ``gcc.BasicBlock`` is a wrapper around GCC's `basic_block` type.
.. py:attribute:: index
The index of the block (an int), as seen in the cfg_to_dot rendering.
.. py:attribute:: preds
The list of predecessor :py:class:`gcc.Edge` instances leading into this
block
.. py:attribute:: succs
The list of successor :py:class:`gcc.Edge` instances leading out of this
block
.. py:attribute:: phi_nodes
The list of :py:class:`gcc.GimplePhi` phoney functions at the top of this
block, if appropriate for this pass, or None
.. py:attribute:: gimple
The list of :py:class:`gcc.Gimple` instructions, if appropriate for this
pass, or None
.. py:attribute:: rtl
The list of :py:class:`gcc.Rtl` expressions, if appropriate for this
pass, or None
.. py:class:: gcc.Edge
A wrapper around GCC's `edge` type.
.. py:attribute:: src
The source :py:class:`gcc.BasicBlock` of this edge
.. py:attribute:: dest
The destination :py:class:`gcc.BasicBlock` of this edge
.. py:attribute:: true_value
Boolean: `True` if this edge is taken when a :py:class:`gcc.GimpleCond`
conditional is true, `False` otherwise
.. py:attribute:: false_value
Boolean: `True` if this edge is taken when a :py:class:`gcc.GimpleCond`
conditional is false, `False` otherwise
.. py:attribute:: complex
Boolean: `True` if this edge is "special" e.g. due to
exception-handling, or some other kind of "strange" control flow transfer,
`False` otherwise
.. various other EDGE_ booleans, though it's not clear that they should be
documented
================================================
FILE: docs/conf.py
================================================
# Copyright 2011, 2012, 2013 David Malcolm <dmalcolm@redhat.com>
# Copyright 2011, 2012 Red Hat, Inc.
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
#
# gcc-python-plugin documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 1 15:53:48 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the projec
gitextract_vqz28poh/ ├── .gitignore ├── .travis.yml ├── COPYING ├── LICENSES.txt ├── Makefile ├── README.rst ├── configbuilder.py ├── contributors.rst ├── cpybuilder.py ├── cpychecker.py ├── dejagnu.py ├── demo.c ├── demo.expected ├── demo.expected.no-refcounts ├── docs/ │ ├── 0.10.rst │ ├── 0.11.rst │ ├── 0.12.rst │ ├── 0.13.rst │ ├── 0.14.rst │ ├── 0.15.rst │ ├── 0.16.rst │ ├── 0.17.rst │ ├── 0.7.rst │ ├── 0.8.rst │ ├── 0.9.rst │ ├── Makefile │ ├── appendices.rst │ ├── attributes.rst │ ├── basics.rst │ ├── callbacks.rst │ ├── callgraph.rst │ ├── cfg.rst │ ├── conf.py │ ├── cpychecker.rst │ ├── diagnostics.rst │ ├── examples.rst │ ├── gcc-overview.rst │ ├── gcc-with-python.rst │ ├── getting-involved.rst │ ├── gimple.rst │ ├── index.rst │ ├── locations.rst │ ├── lto.rst │ ├── misc.rst │ ├── operators.rst │ ├── options.rst │ ├── parameters.rst │ ├── passes.rst │ ├── preprocessor.rst │ ├── release-notes.rst │ ├── rtl.rst │ ├── success.rst │ ├── tables-of-passes.rst │ ├── tree.rst │ ├── versions.rst │ └── working-with-c.rst ├── examples/ │ ├── show-callgraph.py │ ├── show-docs.py │ ├── show-gimple.py │ ├── show-lto-supergraph.py │ ├── show-passes.py │ └── show-ssa.py ├── gcc-c-api/ │ ├── Makefile │ ├── api.rng │ ├── callgraph.xml │ ├── cfg.xml │ ├── constant.xml │ ├── declaration.xml │ ├── design.rst │ ├── diagnostics.xml │ ├── function.xml │ ├── gcc-callgraph.c │ ├── gcc-cfg.c │ ├── gcc-common.h │ ├── gcc-constant.c │ ├── gcc-declaration.c │ ├── gcc-diagnostics.c │ ├── gcc-function.c │ ├── gcc-gimple.c │ ├── gcc-internal.h │ ├── gcc-location.c │ ├── gcc-option.c │ ├── gcc-private-compat.h │ ├── gcc-rtl.c │ ├── gcc-tree.c │ ├── gcc-type.c │ ├── gcc-variable.c │ ├── generate-casts-c.py │ ├── gimple.xml │ ├── location.xml │ ├── option.xml │ ├── rtl.xml │ ├── tree.xml │ ├── type.xml │ ├── variable.xml │ ├── xml-to-h.py │ └── xmltypes.py ├── gcc-python-attribute.c ├── gcc-python-callbacks.c ├── gcc-python-callgraph.c ├── gcc-python-cfg.c ├── gcc-python-closure.c ├── gcc-python-closure.h ├── gcc-python-compat.h ├── gcc-python-diagnostics.c ├── gcc-python-docs ├── gcc-python-function.c ├── gcc-python-gimple.c ├── gcc-python-location.c ├── gcc-python-option.c ├── gcc-python-parameter.c ├── gcc-python-pass.c ├── gcc-python-plugin.spec ├── gcc-python-pretty-printer.c ├── gcc-python-rtl.c ├── gcc-python-tree.c ├── gcc-python-variable.c ├── gcc-python-version.c ├── gcc-python-wrapper.c ├── gcc-python-wrappers.h ├── gcc-python.c ├── gcc-python.h ├── gcc-with-cpychecker ├── gcc-with-python ├── gccutils/ │ ├── __init__.py │ ├── dot.py │ ├── graph/ │ │ ├── __init__.py │ │ ├── ivpgraph.py │ │ ├── query.py │ │ ├── stmtgraph.py │ │ └── supergraph.py │ └── selftests.py ├── generate-callgraph-c.py ├── generate-casts-c.py ├── generate-cfg-c.py ├── generate-config-h.py ├── generate-function-c.py ├── generate-gimple-c.py ├── generate-location-c.py ├── generate-option-c.py ├── generate-parameter-c.py ├── generate-pass-c.py ├── generate-passes-svg.py ├── generate-pretty-printer-c.py ├── generate-rtl-c.py ├── generate-tables-of-passes-rst.py ├── generate-tree-c.py ├── generate-variable-c.py ├── gimple-types.txt.in ├── libcpychecker/ │ ├── PyArg_ParseTuple.py │ ├── Py_BuildValue.py │ ├── __init__.py │ ├── absinterp.py │ ├── attributes.py │ ├── c_stdio.py │ ├── compat.py │ ├── diagnostics.py │ ├── formatstrings.py │ ├── initializers.py │ ├── refcounts.py │ ├── types.py │ ├── utils.py │ └── visualizations.py ├── libcpychecker_html/ │ ├── TODO │ ├── __init__.py │ ├── c-api.txt │ ├── capi.py │ ├── foo.html │ ├── html_to_lxml.py │ ├── json.rst │ ├── make_html.py │ ├── script.js │ ├── style-noprefix.css │ ├── style.css │ └── test/ │ ├── example1/ │ │ ├── bug.c │ │ └── bug.c.make_a_list_of_random_ints_badly.json │ ├── example2/ │ │ ├── _pylibmcmodule.h │ │ ├── pylibmc-issue-68.c │ │ └── pylibmc-issue-68.c.PylibMC_Client_get_multi.json │ └── example3/ │ ├── _mysql.c │ └── _mysql.c.init_mysql.json ├── maketreetypes.py ├── misc/ │ └── fedora/ │ ├── bugreporting.py │ ├── bugreports.txt │ ├── fake-g++.py │ ├── fake-gcc.py │ ├── get-srpms.py │ ├── makeindex.py │ └── mass-rebuild.py ├── print-gcc-version.c ├── rtl-types.txt.in ├── run-test-suite.py ├── test-builder.py ├── test.c ├── test.py ├── testcpybuilder.py ├── testcpychecker.py ├── tests/ │ ├── cpychecker/ │ │ ├── PyArg_Parse/ │ │ │ └── incorrect_codes_S_and_U/ │ │ │ ├── input.c │ │ │ ├── metadata.ini │ │ │ ├── script.py │ │ │ └── stderr.txt │ │ ├── PyArg_ParseTuple/ │ │ │ ├── code_O_bang/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ └── stderr.txt │ │ │ ├── code_s/ │ │ │ │ └── incorrect-constness/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ └── stderr.txt │ │ │ ├── codes_accepting_null/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── correct_codes_S_and_U/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── correct_converter/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── encodings/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── hash_format_codes.inc │ │ │ ├── incorrect_code_z_hash/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ └── stderr.txt │ │ │ ├── incorrect_codes_S_and_U/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ └── stderr.txt │ │ │ ├── incorrect_converters/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ └── stderr.txt │ │ │ ├── keywords/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ └── stderr.txt │ │ │ ├── typedefs/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── with_PY_SSIZE_T_CLEAN/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ └── stderr.txt │ │ │ └── without_PY_SSIZE_T_CLEAN/ │ │ │ ├── input.c │ │ │ ├── metadata.ini │ │ │ ├── script.py │ │ │ └── stderr.txt │ │ ├── PyMethodDef/ │ │ │ ├── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── incorrect-types/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ └── missing-sentinel/ │ │ │ ├── input.c │ │ │ ├── metadata.ini │ │ │ ├── script.py │ │ │ ├── stderr.txt │ │ │ └── stdout.txt │ │ ├── Py_BuildValue/ │ │ │ ├── code_O/ │ │ │ │ └── subclass/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── code_c/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── code_f/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── code_lower_d/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── code_s_hash/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── code_u/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── code_u_hash/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ └── code_upper_D/ │ │ │ ├── correct/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ └── incorrect/ │ │ │ ├── input.c │ │ │ ├── metadata.ini │ │ │ ├── script.py │ │ │ └── stderr.txt │ │ ├── absinterp/ │ │ │ ├── arithmetic/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── division-by-zero/ │ │ │ │ │ ├── definite/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── metadata.ini │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ ├── stderr.txt │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ └── possible/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── fix-trunc-expr/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── negative-shift/ │ │ │ │ ├── definite/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── possible/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── array-range/ │ │ │ │ ├── fully-checked/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── fully-checked-on-stack/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── implicitly-correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── off-by-one/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── partial-initialization-on-stack/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── unchecked/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── upper-checked/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── arrays/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── arrays2/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── arrays3/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── arrays4/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── arrays5/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── arrays6/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── arrays7/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── asm/ │ │ │ │ └── empty/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── assignment-from-string-const/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── bitfields/ │ │ │ │ └── reading/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── casts/ │ │ │ │ ├── int-to-char-with-extraction/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── int-to-char-with-implicit-truncation/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── int-to-char-within-range/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── int-to-float/ │ │ │ │ │ ├── input.c │ │ │ │ │ └── script.py │ │ │ │ ├── int-to-pointer/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ └── script.py │ │ │ │ ├── int-to-pointer2/ │ │ │ │ │ ├── input.c │ │ │ │ │ └── script.py │ │ │ │ ├── pointer-to-long/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── pyobjectptr-to-long/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── comparisons/ │ │ │ │ ├── boundaries/ │ │ │ │ │ ├── ConcreteValue-eq-max-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-eq-min-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-ge-max-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-ge-min-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-gt-max-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-gt-min-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-le-max-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-le-min-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-lt-max-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-lt-min-of-WithinRange/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── ConcreteValue-lt-two-value-range/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ └── WithinRange-eq-ConcreteValue-in-middle/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── conditionals/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── expressions/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── pointers/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── custom-strdup/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── custom-strdup-with-attr/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── exceptions/ │ │ │ │ ├── getopts.py │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── exit/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── function-pointers/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── nested-fields/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── nested-fields2/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── nested-fields3/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── nonnull-attribute/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── read-through-global-ptr-checked/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── read-through-global-ptr-unchecked/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── read-through-uninitialized-ptr/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── real-cst/ │ │ │ │ └── regular/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── result-decl/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── static-data/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── string-constants/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── switch/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── two-loops/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── uninitialized-data/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── void-return/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── write-through-arg-unchecked/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── write-through-global-ptr-checked/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ └── write-through-global-ptr-unchecked/ │ │ │ ├── input.c │ │ │ ├── metadata.ini │ │ │ ├── script.py │ │ │ ├── stderr.txt │ │ │ └── stdout.txt │ │ ├── fileptr-missing-error-check/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stderr.txt │ │ ├── refcounts/ │ │ │ ├── GIL/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyArg_Parse/ │ │ │ │ └── correct_simple/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyArg_ParseTuple/ │ │ │ │ ├── correct_O/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct_O_bang/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct_converter/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── correct_simple/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyArg_ParseTupleAndKeywords/ │ │ │ │ └── correct_O/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyArg_UnpackTuple/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── missing-initialization/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── wrong-number-of-varargs/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyBool_FromLong/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyCObject_FromVoidPtr/ │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyCObject_FromVoidPtrAndDesc/ │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyCapsule_GetPointer/ │ │ │ │ └── basic/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyDict_GetItem/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyDict_GetItemString/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyDict_New/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyDict_SetItem/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyDict_SetItemString/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyDict_Size/ │ │ │ │ └── simple/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_Clear/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_Format/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_NewException/ │ │ │ │ └── basic/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_NoMemory/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_PrintEx/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_SetFromErrno/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_SetNone/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_SetObject/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyErr_SetString/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyEval_CallMethod/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyFloat_AsDouble/ │ │ │ │ ├── correct_PyFloatObject/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── correct_cast/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyFloat_FromDouble/ │ │ │ │ └── simple/ │ │ │ │ ├── #input.c# │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyGILState_Ensure/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyInt_AsLong/ │ │ │ │ ├── correct_PyIntObject/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── correct_cast/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyInt_FromLong/ │ │ │ │ ├── correct_large_int/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── correct_small_int/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyIter_Next/ │ │ │ │ └── simple/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyList_Append/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── incorrect/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── incorrect-loop/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── null-newitem/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── ticket-19/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── ticket-22/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyList_GetItem/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyList_SET_ITEM_macro/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct_multiple/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect_multiple/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyList_Size/ │ │ │ │ ├── known-size/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── unknown-size/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyMapping_Size/ │ │ │ │ └── basic/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyMem_Malloc/ │ │ │ │ └── correct/ │ │ │ │ ├── alloc-and-free/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── free-NULL/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyModule_AddObject/ │ │ │ │ └── incorrect-with-cast/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_CallFunction/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_CallFunctionObjArgs/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_CallMethod/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── correct-code-N/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_CallMethodObjArgs/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_CallObject/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_GenericGetAttr/ │ │ │ │ └── basic/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_GenericSetAttr/ │ │ │ │ └── basic/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_GetAttr/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_GetAttrString/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_GetItem/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_HasAttrString/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_IsTrue/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyObject_SetAttrString/ │ │ │ │ └── ignored-lhs/ │ │ │ │ ├── input.c │ │ │ │ └── script.py │ │ │ ├── PySequence_SetItem/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PySequence_Size/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── null/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyString_AsString/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── incorrect/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── unknown/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyString_Concat/ │ │ │ │ ├── basic/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── leak-of-rhs/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── null-lhs/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── null-rhs/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyString_ConcatAndDel/ │ │ │ │ ├── basic/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── null-lhs/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── null-rhs/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyString_FromStringAndSize/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyString_Size/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyStructSequence/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PySys_GetObject/ │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PySys_SetObject/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyTuple_GetItem/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyTuple_New/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyTuple_Pack/ │ │ │ │ └── incorrect-arg-count/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyTuple_SET_ITEM_macro/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct_multiple/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect_multiple/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyTuple_SetItem/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct_multiple/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect_multiple/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── PyTuple_Size/ │ │ │ │ ├── incorrect/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── ticket-24/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyType_IsSubtype/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyUnicode_AsUTF8String/ │ │ │ │ └── basic/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── PyWeakref_GetObject/ │ │ │ │ ├── NULL/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── Py_BuildValue/ │ │ │ │ ├── Py_TYPE/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct-code-N/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct-code-O/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── correct-code-s/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── Py_FatalError/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── Py_Finalize/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── SWIG_Python_ErrorType/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── SWIG_Python_SetErrorMsg/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── _PyObject_New/ │ │ │ │ └── correct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── __builtin_expect/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── attributes/ │ │ │ │ ├── returns-borrowed-ref/ │ │ │ │ │ ├── correct-marking/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── correct-usage/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── incorrect-marking/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── metadata.ini │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ ├── stderr.txt │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ └── incorrect-usage/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── sets-exception/ │ │ │ │ │ ├── correct-marking/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── correct-usage/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ └── incorrect-marking/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── sets-exception-on-nonzero-return/ │ │ │ │ │ ├── correct-marking/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ ├── correct-usage/ │ │ │ │ │ │ ├── input.c │ │ │ │ │ │ ├── script.py │ │ │ │ │ │ └── stdout.txt │ │ │ │ │ └── incorrect-marking/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── steals-reference-to-arg/ │ │ │ │ ├── correct-marking/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── correct-usage/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── incorrect-marking/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect-usage/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── combinatorial-explosion/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── combinatorial-explosion-with-error/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── correct_decref/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── correct_object_ctor/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── correct_py_none/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── cplusplus/ │ │ │ │ ├── destructor/ │ │ │ │ │ ├── input.cc │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── empty-function/ │ │ │ │ │ ├── input.cc │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── method/ │ │ │ │ │ ├── input.cc │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ ├── reference/ │ │ │ │ │ ├── input.cc │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── simple/ │ │ │ │ │ ├── input.cc │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── this/ │ │ │ │ ├── input.cc │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── fold_conditional/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── function-that-exits/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── getter/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── handle_null_error/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── incorrect_py_none/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── json/ │ │ │ │ └── basic/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── loop_n_times/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── loops/ │ │ │ │ ├── complex-loop-conditional-1/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── complex-loop-conditional-2/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── macros/ │ │ │ │ └── Py_XDECREF/ │ │ │ │ └── crash/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── missing_decref/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── module_handling/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── multiple-returns/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── not_setting_exception/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── object_from_callback/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── object_leak/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── passing_dead_object/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── returning_dead_object/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── storage_regions/ │ │ │ │ └── static/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── incorrect/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── subclass/ │ │ │ │ ├── detection/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── handling/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ ├── incorrect-subclass-ptr/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── opaque-struct/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── ticket-20/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── too_many_increfs/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── tp_iternext/ │ │ │ │ ├── correct/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── script.py │ │ │ │ │ └── stdout.txt │ │ │ │ └── partial-type-object/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── uninitialized_data/ │ │ │ │ ├── comparison/ │ │ │ │ │ ├── input.c │ │ │ │ │ ├── metadata.ini │ │ │ │ │ ├── script.py │ │ │ │ │ ├── stderr.txt │ │ │ │ │ └── stdout.txt │ │ │ │ └── function_arg/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── unrecognized_function/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── unrecognized_function2/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── unrecognized_function3/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ ├── unrecognized_function4/ │ │ │ │ ├── input.c │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ ├── use_after_dealloc/ │ │ │ │ ├── input.c │ │ │ │ ├── metadata.ini │ │ │ │ ├── script.py │ │ │ │ ├── stderr.txt │ │ │ │ └── stdout.txt │ │ │ └── without-python-headers/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ └── unknown-function/ │ │ ├── input.c │ │ └── script.py │ ├── examples/ │ │ ├── attributes/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── attributes-with-macros/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── c/ │ │ │ └── struct/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── cplusplus/ │ │ │ ├── classes/ │ │ │ │ ├── input.cc │ │ │ │ ├── script.py │ │ │ │ └── stdout.txt │ │ │ └── methods/ │ │ │ ├── getopts.py │ │ │ ├── input.cc │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── find-global-state/ │ │ │ ├── input.c │ │ │ ├── metadata.ini │ │ │ ├── script.py │ │ │ └── stderr.txt │ │ ├── hello-world/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── lto/ │ │ │ ├── input-f.c │ │ │ ├── input-g.c │ │ │ ├── input-main.c │ │ │ ├── script.py │ │ │ └── test.h │ │ └── spelling-checker/ │ │ ├── input.c │ │ ├── metadata.ini │ │ ├── script.py │ │ ├── stderr.txt │ │ └── stdout.txt │ ├── gccutils/ │ │ ├── graph/ │ │ │ ├── input.c │ │ │ ├── metadata.ini │ │ │ ├── script.py │ │ │ └── stderr.txt │ │ └── topological-sort/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ └── plugin/ │ ├── array-type/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── arrays/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── attributes/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── callback-FINISH_DECL/ │ │ ├── input.c │ │ ├── metadata.ini │ │ ├── script.py │ │ └── stdout.txt │ ├── callbacks/ │ │ ├── PLUGIN_FINISH/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── args/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── exception/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stderr.txt │ │ └── refs/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── callgraph/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── compound-locations/ │ │ ├── input.c │ │ └── script.py │ ├── constants/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── diagnostics/ │ │ ├── getopts.py │ │ ├── input.c │ │ ├── script.py │ │ └── stderr.txt │ ├── dumpfiles/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── enum-type/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── expressions/ │ │ └── get_symbol/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── function-types/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── functions/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── gc/ │ │ ├── _force_garbage_collection/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── _gc_selftest/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ └── segfault-on-instance-of-pass-subclass/ │ │ ├── input.c │ │ └── script.py │ ├── gimple-asm/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── gimple-cond/ │ │ ├── explicit-comparison/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ └── implicit-comparison/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── gimple-walk-tree/ │ │ ├── dump-all/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ ├── exceptions/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ ├── stderr.txt │ │ │ └── stdout.txt │ │ └── find-one/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── identifiers/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── initializers/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── language-specific-errors/ │ │ └── fullname/ │ │ ├── input.c │ │ ├── script.py │ │ ├── stderr.txt │ │ └── stdout.txt │ ├── macros/ │ │ ├── correct/ │ │ │ ├── input.c │ │ │ ├── script.py │ │ │ └── stdout.txt │ │ └── too-early/ │ │ ├── input.c │ │ ├── script.py │ │ ├── stderr.txt │ │ └── stdout.txt │ ├── namespace/ │ │ ├── input.cc │ │ ├── script.py │ │ └── stdout.txt │ ├── new-passes/ │ │ ├── input.c │ │ ├── script.py │ │ ├── stderr.txt │ │ └── stdout.txt │ ├── options/ │ │ ├── getopts.py │ │ ├── input.c │ │ ├── script.py │ │ ├── stderr.txt │ │ └── stdout.txt │ ├── parameters/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── rich-location/ │ │ ├── input.c │ │ └── script.py │ ├── rtl/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── switch/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── syntax-error/ │ │ ├── input.c │ │ ├── script.py │ │ └── stderr.txt │ ├── sys/ │ │ ├── input.c │ │ └── script.py │ ├── translation-units/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── type-attributes/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ ├── types/ │ │ ├── input.c │ │ ├── script.py │ │ └── stdout.txt │ └── version/ │ ├── input.c │ ├── script.py │ └── stdout.txt ├── tree-types.txt.in └── wrapperbuilder.py
SYMBOL INDEX (2471 symbols across 478 files)
FILE: configbuilder.py
function indent (line 23) | def indent(prefix, text):
class ConfigurationFailure (line 28) | class ConfigurationFailure(Exception):
class CheckFor (line 31) | class CheckFor:
method __init__ (line 36) | def __init__(self, initmsg, mandatory, okmsg=None, failmsg='failed'):
method __enter__ (line 44) | def __enter__(self):
method __exit__ (line 48) | def __exit__(self, exc_type, exc_val, exc_tb):
method succeeded (line 77) | def succeeded(self):
class Result (line 81) | class Result:
class OptionFlag (line 84) | class OptionFlag(Result):
method __init__ (line 86) | def __init__(self, description, flag, defn):
method write_to (line 91) | def write_to(self, f):
class ConfigBuilder (line 98) | class ConfigBuilder:
method __init__ (line 99) | def __init__(self, argv):
method make_test_dir (line 116) | def make_test_dir(self, test):
method write_outcome (line 124) | def write_outcome(self):
method compile (line 131) | def compile(self, test, src, extraargs):
method capture_shell_output (line 158) | def capture_shell_output(self, initmsg, cmd):
method test_for_mandatory_c_header (line 167) | def test_for_mandatory_c_header(self, header, extraargs):
method test_c_compilation (line 176) | def test_c_compilation(self, initmsg, src, extraargs, description, defn):
FILE: cpybuilder.py
function camel_case (line 25) | def camel_case(txt):
function nullable_ptr (line 29) | def nullable_ptr(ptr):
function simple_unaryfunc (line 35) | def simple_unaryfunc(identifier, typename, c_expression):
class NamedEntity (line 45) | class NamedEntity:
method __init__ (line 47) | def __init__(self, identifier):
method c_ptr_field (line 50) | def c_ptr_field(self, name, cast=None):
method unaryfunc_field (line 65) | def unaryfunc_field(self, name):
method c_src_field (line 68) | def c_src_field(self, name):
method c_src_field_value (line 77) | def c_src_field_value(self, name, val, cast=None):
class PyGetSetDef (line 88) | class PyGetSetDef:
method __init__ (line 89) | def __init__(self, name, get, set, doc, closure=None):
method c_defn (line 96) | def c_defn(self):
class PyGetSetDefTable (line 104) | class PyGetSetDefTable(NamedEntity):
method __init__ (line 105) | def __init__(self, identifier, gsdefs, identifier_prefix=None, typenam...
method c_defn (line 111) | def c_defn(self):
method add_gsdef (line 119) | def add_gsdef(self, name, getter, setter, doc, closure=None):
method add_simple_getter (line 122) | def add_simple_getter(self, cu, name, c_expression, doc):
class PyMethodDef (line 131) | class PyMethodDef:
method __init__ (line 132) | def __init__(self, name, fn_name, args, docstring):
method c_defn (line 139) | def c_defn(self):
class PyMethodTable (line 143) | class PyMethodTable(NamedEntity):
method __init__ (line 144) | def __init__(self, identifier, methods):
method c_defn (line 148) | def c_defn(self):
method add_method (line 156) | def add_method(self, name, fn_name, args, docstring):
class PyNumberMethods (line 160) | class PyNumberMethods(NamedEntity):
method __init__ (line 161) | def __init__(self, identifier):
method c_defn (line 164) | def c_defn(self):
method add_method (line 224) | def add_method(self, name, fn_name, args, docstring):
class PyTypeObject (line 227) | class PyTypeObject(NamedEntity):
method __init__ (line 228) | def __init__(self, identifier, localname, tp_name, struct_name, **kwar...
method c_defn (line 239) | def c_defn(self):
method c_initializer (line 247) | def c_initializer(self):
method c_invoke_type_ready (line 312) | def c_invoke_type_ready(self):
method c_invoke_add_to_module (line 317) | def c_invoke_add_to_module(self):
class PyModule (line 322) | class PyModule:
method __init__ (line 323) | def __init__(self, modname, modmethods, moddoc):
method c_initfn_decl (line 334) | def c_initfn_decl(self):
method c_initfn_def_begin (line 344) | def c_initfn_def_begin(self):
method c_initfn_def_end (line 356) | def c_initfn_def_end(self):
method c_py3k_moduledef (line 375) | def c_py3k_moduledef(self):
method c_invoke_ctor (line 390) | def c_invoke_ctor(self):
class CompilationUnit (line 404) | class CompilationUnit:
method __init__ (line 408) | def __init__(self):
method add_include (line 415) | def add_include(self, path):
method add_decl (line 418) | def add_decl(self, text):
method add_defn (line 421) | def add_defn(self, text):
method as_str (line 424) | def as_str(self):
method make_header (line 432) | def make_header(self, text):
method add_simple_getter (line 435) | def add_simple_getter(self, identifier, typename, c_expression):
method add_simple_setter (line 444) | def add_simple_setter(self, identifier, typename, attrname, c_typechec...
method add_simple_int_setter (line 459) | def add_simple_int_setter(self, identifier, typename, attrname, c_assi...
class SimpleModule (line 468) | class SimpleModule:
method __init__ (line 472) | def __init__(self):
method add_type_object (line 478) | def add_type_object(self, name, localname,
method add_module_init (line 485) | def add_module_init(self, modname, modmethods, moddoc):
class SimpleBuild (line 498) | class SimpleBuild:
method __init__ (line 499) | def __init__(self, sm, builddir='.'):
class CommandError (line 505) | class CommandError(RuntimeError):
method __init__ (line 506) | def __init__(self, out, err, p):
method __str__ (line 515) | def __str__(self):
method _indent (line 526) | def _indent(self, txt, size=2):
method _extra_info (line 529) | def _extra_info(self):
class PyRuntimeError (line 532) | class PyRuntimeError(CommandError):
method __init__ (line 533) | def __init__(self, runtime, cmd, out, err, p):
method _describe_activity (line 538) | def _describe_activity(self):
class PyVersionInfo (line 542) | class PyVersionInfo(namedtuple('PyVersionInfo', 'major minor micro relea...
method from_text (line 544) | def from_text(cls, txt):
FILE: dejagnu.py
class Directive (line 23) | class Directive:
method __init__ (line 27) | def __init__(self, inputfile, linenum, name, args):
method parse_args (line 38) | def parse_args(args):
method __repr__ (line 63) | def __repr__(self):
class ExpectedDiagnostic (line 67) | class ExpectedDiagnostic:
method __init__ (line 71) | def __init__(self, kind, pattern, directive):
method __repr__ (line 85) | def __repr__(self):
class ExpectedMultilineOutput (line 89) | class ExpectedMultilineOutput:
method __init__ (line 90) | def __init__(self, directive, start, end, lines):
method __repr__ (line 97) | def __repr__(self):
class Result (line 101) | class Result:
method __init__ (line 106) | def __init__(self, status, directive, message):
method __str__ (line 111) | def __str__(self):
method __repr__ (line 120) | def __repr__(self):
class DgContext (line 124) | class DgContext:
method __init__ (line 128) | def __init__(self, inputfiles, verbosity=0):
method parse_directives (line 138) | def parse_directives(self, inputfile):
method parse_line (line 146) | def parse_line(self, inputfile, linenum, line):
method handle_directive (line 157) | def handle_directive(self, directive):
method expected_diagnostic (line 175) | def expected_diagnostic(self, kind, directive):
method begin_multiline_output (line 180) | def begin_multiline_output(self, directive):
method end_multiline_output (line 184) | def end_multiline_output(self, directive):
method get_args (line 193) | def get_args(self):
method check_result (line 196) | def check_result(self, stdout, stderr, exitcode):
method prune_stderr (line 218) | def prune_stderr(self, stderr):
method on_pass (line 236) | def on_pass(self, directive, issue):
method on_fail (line 239) | def on_fail(self, directive, issue):
method add_result (line 242) | def add_result(self, result):
method num_failures (line 247) | def num_failures(self):
function uses_dg_directives (line 254) | def uses_dg_directives(inputfiles):
class Tests (line 261) | class Tests(unittest.TestCase):
method test_parse_line (line 262) | def test_parse_line(self):
method test_nonempty_stdout (line 272) | def test_nonempty_stdout(self):
method test_surplus_errors (line 282) | def test_surplus_errors(self):
method test_dg_message_found (line 292) | def test_dg_message_found(self):
method test_dg_message_not_found (line 309) | def test_dg_message_not_found(self):
method test_directive_with_full_args (line 327) | def test_directive_with_full_args(self):
method test_directive_with_full_args_2 (line 349) | def test_directive_with_full_args_2(self):
method test_dg_options (line 371) | def test_dg_options(self):
method test_dg_do (line 379) | def test_dg_do(self):
method test_multiline_ranges (line 387) | def test_multiline_ranges(self):
FILE: demo.c
function PyObject (line 31) | PyObject *
function PyObject (line 43) | PyObject *
function PyObject (line 52) | PyObject *
function PyObject (line 62) | PyObject *
function PyObject (line 77) | PyObject *
function PyObject (line 89) | PyObject *
FILE: examples/show-callgraph.py
function on_pass_execution (line 31) | def on_pass_execution(p, fn):
FILE: examples/show-gimple.py
class ShowGimple (line 26) | class ShowGimple(gcc.GimplePass):
method execute (line 27) | def execute(self, fun):
FILE: examples/show-lto-supergraph.py
class ShowSupergraph (line 28) | class ShowSupergraph(gcc.IpaPass):
method execute (line 29) | def execute(self):
FILE: examples/show-passes.py
function my_pass_execution_callback (line 22) | def my_pass_execution_callback(*args, **kwargs):
FILE: examples/show-ssa.py
class ShowSsa (line 25) | class ShowSsa(gcc.GimplePass):
method execute (line 26) | def execute(self, fun):
FILE: gcc-c-api/gcc-callgraph.c
function gcc_private_make_cgraph_node (line 38) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_cgraph_node)
function gcc_cgraph_node_mark_in_use (line 46) | GCC_PUBLIC_API (void) gcc_cgraph_node_mark_in_use (gcc_cgraph_node node)
function gcc_cgraph_node_get_decl (line 58) | GCC_PUBLIC_API (gcc_function_decl)
function gcc_cgraph_node_for_each_callee (line 85) | GCC_PUBLIC_API (bool)
function gcc_cgraph_node_for_each_caller (line 103) | GCC_PUBLIC_API (bool)
function gcc_private_make_cgraph_edge (line 124) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_cgraph_edge)
function gcc_cgraph_edge_mark_in_use (line 132) | GCC_PUBLIC_API (void) gcc_cgraph_edge_mark_in_use (gcc_cgraph_edge edge)
function gcc_cgraph_edge_get_caller (line 137) | GCC_PUBLIC_API (gcc_cgraph_node)
function gcc_cgraph_edge_get_callee (line 143) | GCC_PUBLIC_API (gcc_cgraph_node)
function gcc_cgraph_edge_get_call_stmt (line 149) | GCC_PUBLIC_API (gcc_gimple_call)
function gcc_for_each_cgraph_node (line 155) | GCC_PUBLIC_API (bool)
FILE: gcc-c-api/gcc-cfg.c
function gcc_private_make_cfg (line 56) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_cfg)
function gcc_cfg_mark_in_use (line 64) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_cfg_mark_in_use (gcc_cfg cfg)
function gcc_cfg_get_entry (line 69) | GCC_IMPLEMENT_PUBLIC_API (gcc_cfg_block) gcc_cfg_get_entry (gcc_cfg cfg)
function gcc_cfg_get_exit (line 74) | GCC_IMPLEMENT_PUBLIC_API (gcc_cfg_block) gcc_cfg_get_exit (gcc_cfg cfg)
function gcc_cfg_for_each_block (line 79) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_private_make_cfg_block (line 103) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_cfg_block)
function gcc_cfg_block_mark_in_use (line 111) | GCC_IMPLEMENT_PUBLIC_API (void)
function gcc_cfg_block_get_index (line 117) | GCC_IMPLEMENT_PUBLIC_API (int)
function gcc_cfg_block_for_each_pred_edge (line 147) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_cfg_block_for_each_succ_edge (line 156) | GCC_IMPLEMENT_PUBLIC_API (bool)
type gimple_bb_info (line 173) | struct gimple_bb_info
function gcc_cfg_block_for_each_gimple_phi (line 189) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_cfg_block_for_each_gimple (line 219) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_cfg_block_for_each_rtl_insn (line 248) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_private_make_cfg_edge (line 279) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_cfg_edge)
function gcc_cfg_edge_mark_in_use (line 287) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_cfg_edge_mark_in_use (gcc_cfg_edge e...
function gcc_cfg_edge_get_src (line 292) | GCC_IMPLEMENT_PUBLIC_API (gcc_cfg_block)
function gcc_cfg_edge_get_dest (line 298) | GCC_IMPLEMENT_PUBLIC_API (gcc_cfg_block)
function gcc_cfg_edge_is_true_value (line 304) | GCC_PUBLIC_API (bool) gcc_cfg_edge_is_true_value (gcc_cfg_edge edge)
function gcc_cfg_edge_is_false_value (line 309) | GCC_PUBLIC_API (bool) gcc_cfg_edge_is_false_value (gcc_cfg_edge edge)
function gcc_cfg_edge_is_loop_exit (line 314) | GCC_PUBLIC_API(bool)
function gcc_cfg_edge_get_can_fallthru (line 320) | GCC_PUBLIC_API(bool)
function gcc_cfg_edge_is_complex (line 326) | GCC_PUBLIC_API(bool)
function gcc_cfg_edge_is_eh (line 332) | GCC_PUBLIC_API(bool)
FILE: gcc-c-api/gcc-common.h
type gimple (line 31) | typedef gimple *gimple_stmt_ptr;
type gimple (line 33) | typedef gimple gimple_stmt_ptr;
FILE: gcc-c-api/gcc-constant.c
function gcc_string_constant_get_char_ptr (line 31) | GCC_IMPLEMENT_PUBLIC_API(const char*)
FILE: gcc-c-api/gcc-declaration.c
function gcc_decl_get_location (line 32) | GCC_IMPLEMENT_PUBLIC_API (gcc_location) gcc_decl_get_location (gcc_decl ...
function gcc_decl_is_artificial (line 37) | GCC_IMPLEMENT_PUBLIC_API (bool) gcc_decl_is_artificial (gcc_decl decl)
function gcc_decl_is_builtin (line 42) | GCC_IMPLEMENT_PUBLIC_API(bool) gcc_decl_is_builtin(gcc_decl decl)
function gcc_private_make_function_decl (line 103) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_function_decl)
function gcc_private_make_translation_unit_decl (line 111) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_translation_unit_decl)
function gcc_translation_unit_decl_get_block (line 165) | GCC_IMPLEMENT_PUBLIC_API (gcc_block)
function gcc_translation_unit_decl_get_language (line 171) | GCC_IMPLEMENT_PUBLIC_API (const char *)
function gcc_var_decl_get_initial (line 186) | GCC_IMPLEMENT_PUBLIC_API(gcc_constructor)
function gcc_var_decl_is_static (line 192) | GCC_IMPLEMENT_PUBLIC_API(bool)
function gcc_for_each_translation_unit_decl (line 201) | GCC_IMPLEMENT_PUBLIC_API (bool)
FILE: gcc-c-api/gcc-diagnostics.c
function gcc_inform (line 24) | GCC_IMPLEMENT_PUBLIC_API(void)
function gcc_error_at (line 30) | GCC_IMPLEMENT_PUBLIC_API(void)
function gcc_warning_at (line 37) | GCC_IMPLEMENT_PUBLIC_API(bool)
function gcc_permerror (line 44) | GCC_IMPLEMENT_PUBLIC_API(bool)
FILE: gcc-c-api/gcc-function.c
function gcc_function_mark_in_use (line 43) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_function_mark_in_use (gcc_function f...
function gcc_private_make_function (line 48) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_function)
function gcc_function_get_cfg (line 56) | GCC_IMPLEMENT_PUBLIC_API (gcc_cfg) gcc_function_get_cfg (gcc_function func)
function gcc_function_get_decl (line 61) | GCC_IMPLEMENT_PUBLIC_API (gcc_function_decl)
function gcc_function_get_index (line 67) | GCC_IMPLEMENT_PUBLIC_API (int) gcc_function_get_index (gcc_function func)
function gcc_function_get_start (line 72) | GCC_IMPLEMENT_PUBLIC_API (gcc_location)
function gcc_function_get_end (line 78) | GCC_IMPLEMENT_PUBLIC_API (gcc_location)
function gcc_get_current_function (line 84) | GCC_IMPLEMENT_PUBLIC_API (gcc_function) gcc_get_current_function (void)
FILE: gcc-c-api/gcc-gimple.c
function gcc_gimple_mark_in_use (line 55) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_gimple_mark_in_use (gcc_gimple stmt)
function gcc_private_make_gimple_phi (line 74) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_gimple_phi)
function gcc_private_make_gimple_call (line 83) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_gimple_call)
function gcc_private_make_gimple (line 92) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_gimple)
function gcc_gimple_get_location (line 104) | GCC_IMPLEMENT_PUBLIC_API (gcc_location)
function gcc_gimple_get_block (line 110) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree) gcc_gimple_get_block (gcc_gimple stmt)
function gcc_gimple_get_expr_type (line 115) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree) gcc_gimple_get_expr_type (gcc_gimple...
function gcc_gimple_asm_get_string (line 123) | GCC_IMPLEMENT_PUBLIC_API (const char *)
function gcc_gimple_assign_get_lhs (line 132) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_call_get_lhs (line 141) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_call_get_fn (line 147) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_call_get_fndecl (line 153) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_call_is_noreturn (line 159) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_gimple_call_for_each_arg (line 165) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_gimple_return_get_retval (line 187) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_cond_get_lhs (line 197) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_cond_get_rhs (line 203) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_cond_get_true_label (line 209) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_cond_get_false_label (line 216) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_phi_get_lhs (line 226) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_phi_get_result (line 232) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_switch_get_indexvar (line 259) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_gimple_switch_for_each_label (line 266) | GCC_IMPLEMENT_PUBLIC_API (bool)
function gcc_gimple_label_get_label (line 290) | GCC_IMPLEMENT_PUBLIC_API(gcc_label_decl)
FILE: gcc-c-api/gcc-location.c
function gcc_private_make_location (line 25) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_location)
function gcc_location_mark_in_use (line 33) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_location_mark_in_use (gcc_location loc)
function gcc_location_get_filename (line 38) | GCC_IMPLEMENT_PUBLIC_API (const char *)
function gcc_location_get_line (line 44) | GCC_IMPLEMENT_PUBLIC_API (int) gcc_location_get_line (gcc_location loc)
function gcc_location_get_column (line 49) | GCC_IMPLEMENT_PUBLIC_API (int) gcc_location_get_column (gcc_location loc)
function gcc_location_is_unknown (line 55) | GCC_PUBLIC_API (bool) gcc_location_is_unknown (gcc_location loc)
function gcc_location_get_in_system_header (line 60) | GCC_IMPLEMENT_PUBLIC_API (bool) gcc_location_get_in_system_header (gcc_l...
function gcc_location_get_caret (line 73) | GCC_IMPLEMENT_PUBLIC_API (gcc_location)
function gcc_location_get_start (line 79) | GCC_IMPLEMENT_PUBLIC_API (gcc_location)
function gcc_location_get_finish (line 85) | GCC_IMPLEMENT_PUBLIC_API (gcc_location)
function gcc_location_offset_column (line 99) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
function gcc_set_input_location (line 109) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_set_input_location (gcc_location loc)
function gcc_get_input_location (line 114) | GCC_IMPLEMENT_PUBLIC_API (gcc_location) gcc_get_input_location (void)
FILE: gcc-c-api/gcc-option.c
function gcc_private_make_option (line 29) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_option)
function gcc_option_mark_in_use (line 37) | GCC_IMPLEMENT_PUBLIC_API (void)
function gcc_option_get_text (line 44) | GCC_IMPLEMENT_PUBLIC_API (const char*)
function gcc_for_each_option (line 50) | GCC_IMPLEMENT_PUBLIC_API (bool)
FILE: gcc-c-api/gcc-rtl.c
function gcc_rtl_insn_mark_in_use (line 28) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_rtl_insn_mark_in_use (gcc_rtl_insn i...
function gcc_private_make_rtl_insn (line 33) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_rtl_insn)
FILE: gcc-c-api/gcc-tree.c
function gcc_tree_mark_in_use (line 32) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_tree_mark_in_use (gcc_tree node)
function gcc_private_make_tree (line 38) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_tree)
function gcc_private_make_block (line 47) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_block)
function gcc_binary_get_location (line 58) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
function gcc_comparison_get_location (line 93) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
function gcc_expression_get_location (line 102) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
function gcc_addr_expr_get_operand (line 111) | GCC_IMPLEMENT_PUBLIC_API(gcc_tree)
function gcc_reference_get_location (line 120) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
function gcc_array_ref_get_array (line 129) | GCC_IMPLEMENT_PUBLIC_API(gcc_tree)
function gcc_array_ref_get_index (line 135) | GCC_IMPLEMENT_PUBLIC_API(gcc_tree)
function gcc_component_ref_get_target (line 145) | GCC_IMPLEMENT_PUBLIC_API(gcc_tree)
function gcc_component_ref_get_field (line 151) | GCC_IMPLEMENT_PUBLIC_API(gcc_tree)
function gcc_mem_ref_get_operand (line 160) | GCC_IMPLEMENT_PUBLIC_API(gcc_tree)
function gcc_ssa_name_get_var (line 169) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree) gcc_ssa_name_get_var (gcc_ssa_name n...
function gcc_ssa_name_get_def_stmt (line 174) | GCC_IMPLEMENT_PUBLIC_API (gcc_gimple)
function gcc_ssa_name_get_version (line 180) | GCC_IMPLEMENT_PUBLIC_API (int) gcc_ssa_name_get_version (gcc_ssa_name node)
function gcc_statement_get_location (line 191) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
function gcc_private_make_case_label_expr (line 200) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_case_label_expr)
function gcc_case_label_expr_get_low (line 209) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_case_label_expr_get_high (line 215) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree)
function gcc_case_label_expr_get_target (line 221) | GCC_IMPLEMENT_PUBLIC_API (gcc_label_decl)
function gcc_unary_get_location (line 232) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
function gcc_unary_get_operand (line 238) | GCC_IMPLEMENT_PUBLIC_API(gcc_tree)
function gcc_vlexp_get_location (line 247) | GCC_IMPLEMENT_PUBLIC_API(gcc_location)
FILE: gcc-c-api/gcc-type.c
function gcc_private_make_type (line 31) | GCC_IMPLEMENT_PRIVATE_API (gcc_type)
function gcc_private_make_pointer_type (line 39) | GCC_IMPLEMENT_PRIVATE_API (gcc_pointer_type)
function gcc_type_get_name (line 51) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree) gcc_type_get_name (gcc_type node)
function gcc_type_get_pointer (line 56) | GCC_IMPLEMENT_PUBLIC_API (gcc_pointer_type)
function gcc_array_type_get_dereference (line 65) | GCC_IMPLEMENT_PUBLIC_API(gcc_type)
function gcc_fixed_point_type_get_precision (line 102) | GCC_IMPLEMENT_PUBLIC_API (int)
function gcc_integer_type_get_max_value (line 114) | GCC_IMPLEMENT_PUBLIC_API (gcc_integer_constant)
function gcc_integer_type_get_min_value (line 120) | GCC_IMPLEMENT_PUBLIC_API (gcc_integer_constant)
function gcc_integer_type_get_precision (line 126) | GCC_IMPLEMENT_PUBLIC_API (int)
function gcc_integer_type_is_unsigned (line 132) | GCC_IMPLEMENT_PUBLIC_API(bool)
function gcc_private_make_integer_constant (line 139) | GCC_IMPLEMENT_PRIVATE_API (gcc_integer_constant)
function gcc_pointer_type_get_dereference (line 164) | GCC_IMPLEMENT_PUBLIC_API(gcc_type)
function gcc_real_type_get_precision (line 179) | GCC_IMPLEMENT_PUBLIC_API (int)
function gcc_vector_type_get_dereference (line 221) | GCC_IMPLEMENT_PUBLIC_API(gcc_type)
FILE: gcc-c-api/gcc-variable.c
function gcc_private_make_variable (line 28) | GCC_IMPLEMENT_PRIVATE_API (struct gcc_variable)
function gcc_variable_mark_in_use (line 36) | GCC_IMPLEMENT_PUBLIC_API (void) gcc_variable_mark_in_use (gcc_variable var)
function gcc_variable_get_decl (line 54) | GCC_IMPLEMENT_PUBLIC_API (gcc_tree) gcc_variable_get_decl (gcc_variable ...
function gcc_for_each_variable (line 80) | GCC_IMPLEMENT_PUBLIC_API (bool)
FILE: gcc-c-api/generate-casts-c.py
function write_header (line 42) | def write_header(out):
function write_footer (line 47) | def write_footer(out):
function main (line 58) | def main(c_filename, xmldir):
FILE: gcc-c-api/xml-to-h.py
function write_header (line 24) | def write_header(out):
function write_footer (line 29) | def write_footer(out):
class SourceWriter (line 40) | class SourceWriter:
method __init__ (line 41) | def __init__(self, out):
method indent (line 45) | def indent(self):
method outdent (line 48) | def outdent(self):
method writeln (line 51) | def writeln(self, line=None):
method write_doc_comment (line 57) | def write_doc_comment(self, doc):
method write_comment (line 60) | def write_comment(self, doc):
method write_begin_extern_c (line 68) | def write_begin_extern_c(self):
method write_end_extern_c (line 73) | def write_end_extern_c(self):
function write_api (line 78) | def write_api(api, out):
function write_public_types (line 235) | def write_public_types(registry, out):
function write_semiprivate_types (line 255) | def write_semiprivate_types(registry, out):
FILE: gcc-c-api/xmltypes.py
function get_c_type (line 23) | def get_c_type(xml_kind):
class TypeNotFound (line 32) | class TypeNotFound(Exception):
method __init__ (line 33) | def __init__(self, xmlname):
method __str__ (line 35) | def __str__(self):
class ApiRegistry (line 38) | class ApiRegistry:
method __init__ (line 39) | def __init__(self):
method load (line 42) | def load(self, filename):
method iter_types (line 45) | def iter_types(self):
method lookup_type (line 50) | def lookup_type(self, xmlname):
class XmlWrapper (line 57) | class XmlWrapper:
method __init__ (line 58) | def __init__(self, api, node):
method __eq__ (line 62) | def __eq__(self, other):
class HasDocsMixin (line 67) | class HasDocsMixin:
method get_doc (line 68) | def get_doc(self):
class Type (line 75) | class Type(XmlWrapper, HasDocsMixin):
method get_xml_name (line 76) | def get_xml_name(self):
method get_c_name (line 79) | def get_c_name(self):
method get_c_prefix (line 82) | def get_c_prefix(self):
method get_base (line 85) | def get_base(self):
method get_bases (line 90) | def get_bases(self):
method get_subclasses (line 98) | def get_subclasses(self, recursive=False):
method get_varname (line 108) | def get_varname(self):
method get_inner_type (line 115) | def get_inner_type(self):
method iter_attrs (line 131) | def iter_attrs(self):
method iter_iters (line 135) | def iter_iters(self):
method iter_functions (line 139) | def iter_functions(self):
class Attribute (line 143) | class Attribute(XmlWrapper, HasDocsMixin):
method get_xml_name (line 144) | def get_xml_name(self):
method get_c_name (line 147) | def get_c_name(self):
method get_xml_kind (line 150) | def get_xml_kind(self):
method get_c_type (line 153) | def get_c_type(self):
method get_varname (line 157) | def get_varname(self):
method get_access (line 167) | def get_access(self):
method is_writable (line 174) | def is_writable(self):
method is_readable (line 178) | def is_readable(self):
class Iterator (line 182) | class Iterator(XmlWrapper, HasDocsMixin):
method get_xml_name (line 183) | def get_xml_name(self):
method get_c_name (line 186) | def get_c_name(self):
method get_type (line 189) | def get_type(self):
class Function (line 193) | class Function(XmlWrapper, HasDocsMixin):
method get_xml_name (line 194) | def get_xml_name(self):
method get_c_name (line 197) | def get_c_name(self):
method get_return_type (line 200) | def get_return_type(self):
method get_c_return_type (line 204) | def get_c_return_type(self):
method iter_params (line 208) | def iter_params(self):
class Parameter (line 212) | class Parameter(XmlWrapper, HasDocsMixin):
method get_xml_name (line 213) | def get_xml_name(self):
method get_xml_type (line 216) | def get_xml_type(self):
method get_c_type (line 219) | def get_c_type(self):
class Doc (line 223) | class Doc(XmlWrapper):
method as_text (line 224) | def as_text(self):
class Api (line 227) | class Api:
method __init__ (line 228) | def __init__(self, registry, filename):
method get_xml_name (line 235) | def get_xml_name(self):
method get_header_filename (line 238) | def get_header_filename(self):
method get_doc (line 241) | def get_doc(self):
method iter_types (line 248) | def iter_types(self):
method lookup_type (line 252) | def lookup_type(self, xmlname):
method iter_attrs (line 257) | def iter_attrs(self):
method iter_iters (line 261) | def iter_iters(self):
method iter_functions (line 265) | def iter_functions(self):
class Tests (line 269) | class Tests(unittest.TestCase):
method test_loading_all (line 270) | def test_loading_all(self):
method test_types (line 275) | def test_types(self):
method test_subclassing (line 283) | def test_subclassing(self):
FILE: gcc-python-attribute.c
function PyObject (line 47) | PyObject *
function tree (line 88) | static tree
function PyObject (line 156) | PyObject*
FILE: gcc-python-callbacks.c
type plugin_event (line 104) | enum plugin_event
type plugin_event (line 104) | enum plugin_event
function PyGcc_IsWithinEvent (line 106) | int PyGcc_IsWithinEvent(enum plugin_event *out_event)
function PyGcc_FinishInvokingCallback (line 125) | static void
function PyGcc_CallbackFor_tree (line 187) | static void
function PyGcc_CallbackFor_PLUGIN_ATTRIBUTES (line 201) | static void
function PyGcc_CallbackFor_PLUGIN_PASS_EXECUTION (line 215) | static void
function PyGcc_CallbackFor_FINISH (line 231) | static void
function PyGcc_CallbackFor_FINISH_UNIT (line 248) | static void
function PyGcc_CallbackFor_GGC_START (line 260) | static void
function PyGcc_CallbackFor_GGC_MARKING (line 272) | static void
function PyGcc_CallbackFor_GGC_END (line 284) | static void
function PyObject (line 297) | PyObject*
FILE: gcc-python-callgraph.c
function PyObject (line 31) | PyObject *
function PyObject (line 38) | PyObject *
function PyObject (line 45) | PyObject *
function PyObject (line 52) | PyObject *
function PyObject (line 63) | PyObject *
function PyObject (line 71) | PyObject *
function PyObject (line 84) | PyObject *
function PyObject (line 106) | PyObject *
function PyGcc_WrtpMarkForPyGccCallgraphEdge (line 116) | void
function PyObject (line 128) | PyObject *
function PyGcc_WrtpMarkForPyGccCallgraphNode (line 149) | void
function PyObject (line 157) | PyObject *
function PyObject (line 171) | PyObject *
FILE: gcc-python-cfg.c
function PyObject (line 49) | PyObject *
function PyObject (line 75) | PyObject *
function PyGcc_WrtpMarkForPyGccEdge (line 85) | void
function PyObject (line 96) | PyObject *
function PyObject (line 104) | PyObject *
function PyObject (line 112) | PyObject *
function PyObject (line 124) | PyObject *
function PyObject (line 135) | static PyObject*
function PyObject (line 145) | PyObject *
function PyObject (line 160) | PyObject *
function PyObject (line 175) | PyObject *
function PyGcc_insert_new_wrapper_into_cache (line 240) | int
function PyObject (line 277) | static PyObject *
function PyGcc_WrtpMarkForPyGccBasicBlock (line 363) | void
function PyObject (line 372) | PyObject *
function add_block_to_list (line 380) | static bool
function PyObject (line 405) | PyObject *
function PyObject (line 415) | PyObject *
function PyObject (line 460) | PyObject *
function PyObject (line 485) | PyObject *
function PyGcc_WrtpMarkForPyGccCfg (line 495) | void
FILE: gcc-python-closure.c
type callback_closure (line 29) | struct callback_closure
type callback_closure (line 32) | struct callback_closure
type plugin_event (line 65) | enum plugin_event
type callback_closure (line 70) | struct callback_closure
type plugin_event (line 72) | enum plugin_event
type callback_closure (line 74) | struct callback_closure
function PyObject (line 81) | PyObject *
function PyGcc_closure_free (line 139) | void
FILE: gcc-python-closure.h
type callback_closure (line 23) | struct callback_closure
type callback_closure (line 32) | struct callback_closure
type callback_closure (line 37) | struct callback_closure
type plugin_event (line 41) | enum plugin_event
type callback_closure (line 44) | struct callback_closure
type callback_closure (line 48) | struct callback_closure
FILE: gcc-python-compat.h
type dump_flags_t (line 27) | typedef int dump_flags_t;
FILE: gcc-python-diagnostics.c
function PyObject (line 43) | PyObject*
function PyObject (line 68) | PyObject *
function PyObject (line 89) | PyObject *
function PyObject (line 144) | PyObject *
FILE: gcc-python-function.c
function PyObject (line 34) | PyObject *
function PyGccFunction_hash (line 61) | long
function PyObject (line 67) | PyObject *
function PyObject (line 107) | PyObject *
function PyGcc_WrtpMarkForPyGccFunction (line 175) | void
FILE: gcc-python-gimple.c
function gcc_gimple_asm (line 51) | gcc_gimple_asm
function gcc_gimple_assign (line 57) | gcc_gimple_assign
function gcc_gimple_call (line 63) | gcc_gimple_call
function gcc_gimple_return (line 69) | gcc_gimple_return
function gcc_gimple_cond (line 75) | gcc_gimple_cond
function gcc_gimple_phi (line 81) | gcc_gimple_phi
function gcc_gimple_switch (line 87) | gcc_gimple_switch
function gcc_gimple_label (line 93) | gcc_gimple_label
function PyObject (line 99) | static PyObject *
function PyObject (line 135) | PyObject *
function PyObject (line 141) | PyObject *
function PyGccGimple_hash (line 147) | long
function PyObject (line 153) | PyObject *
function tree (line 193) | static tree
function PyObject (line 240) | PyObject *
function PyObject (line 276) | PyObject *
function PyObject (line 306) | PyObject *
function PyObject (line 316) | PyObject *
function PyObject (line 324) | PyObject *
function PyObject (line 346) | PyObject *
function PyObject (line 384) | PyObject *
function PyObject (line 403) | static PyObject *
function PyObject (line 428) | PyObject*
function PyGcc_WrtpMarkForPyGccGimple (line 438) | void
FILE: gcc-python-location.c
function PyGccLocation_init (line 38) | int
function PyObject (line 65) | PyObject *
function PyObject (line 73) | PyObject *
function PyObject (line 81) | PyObject *
function PyGccLocation_hash (line 190) | long
function PyObject (line 198) | PyObject *
function PyObject (line 212) | PyObject *
function PyGcc_WrtpMarkForPyGccLocation (line 235) | void
function PyObject (line 246) | PyObject *
function PyGccRichLocation_init (line 267) | int
function PyGcc_WrtpMarkForPyGccRichLocation (line 285) | void
FILE: gcc-python-option.c
function PyGccOption_init (line 42) | int
function PyObject (line 74) | PyObject *
function PyGcc_option_is_enabled (line 97) | int PyGcc_option_is_enabled(enum opt_code opt_code)
function PyObject (line 154) | PyObject *
type cl_option (line 172) | struct cl_option
function PyObject (line 182) | PyObject *
function PyGcc_WrtpMarkForPyGccOption (line 200) | void
FILE: gcc-python-parameter.c
function PyObject (line 34) | PyObject *
function PyGcc_WrtpMarkForPyGccParameter (line 52) | void
FILE: gcc-python-pass.c
function impl_gate (line 45) | static bool impl_gate(function *fun)
function impl_execute (line 110) | static unsigned int impl_execute(function *fun)
function class (line 200) | class PyGccGimplePass : public gimple_opt_pass
function class (line 212) | class PyGccRtlPass : public rtl_opt_pass
function class (line 224) | class PyGccIpaPass : public ipa_opt_pass_d
function class (line 245) | class PyGccSimpleIpaPass : public simple_ipa_opt_pass
function gate_cb (line 261) | static bool gate_cb(void)
function execute_cb (line 266) | static unsigned int execute_cb(void)
function do_pass_init (line 272) | static int
function PyGccGimplePass_init (line 351) | int
function PyGccRtlPass_init (line 359) | int
function PyGccSimpleIpaPass_init (line 367) | int
function PyGccIpaPass_init (line 375) | int
function PyObject (line 385) | PyObject *
type dump_file_info (line 394) | struct dump_file_info
function is_dump_enabled (line 409) | static bool
function PyObject (line 420) | PyObject *
function PyGccPass_set_dump_enabled (line 433) | int
function PyObject (line 490) | PyObject *
type opt_pass (line 530) | struct opt_pass
type opt_pass (line 531) | struct opt_pass
type opt_pass (line 533) | struct opt_pass
type opt_pass (line 544) | struct opt_pass
function PyObject (line 556) | PyObject *
function PyObject (line 593) | static PyObject *
function PyObject (line 619) | PyObject *
function PyObject (line 627) | PyObject *
function PyObject (line 635) | PyObject *
function PyGccWrapperTypeObject (line 643) | static PyGccWrapperTypeObject *
function PyObject (line 664) | static PyObject *
function PyGcc_WrtpMarkForPyGccPass (line 691) | void
function PyObject (line 701) | PyObject *
FILE: gcc-python-pretty-printer.c
type PyGccPrettyPrinter (line 31) | struct PyGccPrettyPrinter
function pretty_printer (line 68) | pretty_printer*
function PyObject (line 80) | PyObject*
function PyGccPrettyPrinter_dealloc (line 104) | void
FILE: gcc-python-rtl.c
function PyObject (line 28) | PyObject *
function PyObject (line 44) | PyObject *
function PyObject (line 124) | PyObject *
function PyObject (line 150) | PyObject *
function PyObject (line 157) | PyObject *
function PyObject (line 180) | PyObject*
function PyGcc_WrtpMarkForPyGccRtl (line 205) | void
FILE: gcc-python-tree.c
function PyObject (line 75) | __attribute__ ((weak));
function PyObject (line 85) | static PyObject *
function PyObject (line 109) | static PyObject *
function PyObject (line 133) | PyObject *
function PyObject (line 139) | PyObject *
function PyObject (line 145) | PyObject *
function PyObject (line 167) | PyObject *
function PyObject (line 173) | PyObject *
function PyGccTree_hash (line 179) | long
function PyObject (line 203) | PyObject *
function PyObject (line 281) | PyObject *
function PyObject (line 287) | PyObject *
function PyObject (line 301) | PyObject *
function PyObject (line 330) | PyObject *
function PyObject (line 347) | PyObject *
function PyObject (line 360) | PyObject *
function PyObject (line 388) | PyObject *
function PyObject (line 416) | PyObject *
function PyObject (line 429) | PyObject *
function PyObject (line 483) | __attribute__ ((weak));
function PyObject (line 521) | __attribute__ ((weak));
function PyObject (line 532) | __attribute__ ((weak));
function PyObject (line 543) | PyObject *
function PyObject (line 564) | PyObject *
function PyObject (line 605) | PyObject *
function PyObject (line 623) | PyObject *
function PyObject (line 629) | PyObject *
function PyObject (line 635) | PyObject *
function print_integer_cst_to_buf (line 691) | static void
function PyObject (line 708) | PyObject *
function PyObject (line 722) | PyObject *
function PyObject (line 728) | PyObject *
function PyObject (line 746) | PyObject *
function PyObject (line 777) | PyObject *
function PyObject (line 790) | PyObject *
function PyObject (line 822) | PyObject *
function PyObject (line 833) | PyObject *
function PyObject (line 844) | PyObject *
function PyObject (line 868) | PyObject *
function PyObject (line 921) | PyObject *
type PyGccTree (line 956) | struct PyGccTree
function PyObject (line 991) | PyObject *
function PyObject (line 1008) | static PyObject *
function PyObject (line 1016) | PyObject *
function is_namespace (line 1032) | static int is_namespace (tree decl, void *)
function PyObject (line 1040) | PyObject *
function is_field (line 1072) | static int is_field (tree t, void *)
function is_method (line 1077) | static int is_method (tree t, void *)
function PyObject (line 1084) | PyObject *
function PyObject (line 1095) | PyObject *
function PyObject (line 1122) | static PyObject *
function PyGcc_WrtpMarkForPyGccTree (line 1151) | void
function PyObject (line 1163) | PyObject *
function PyObject (line 1173) | PyObject *
function PyObject (line 1183) | PyObject *
function PyObject (line 1215) | PyObject *
function PyObject (line 1260) | PyObject *
function PyObject (line 1299) | PyObject *
FILE: gcc-python-variable.c
function PyObject (line 25) | PyObject *
function PyGcc_WrtpMarkForPyGccVariable (line 47) | void
FILE: gcc-python-version.c
type plugin_gcc_version (line 27) | struct plugin_gcc_version
type PyStructSequence_Field (line 30) | struct PyStructSequence_Field
type PyStructSequence_Desc (line 39) | struct PyStructSequence_Desc
function PyGcc_version_init (line 48) | void
function PyObject (line 56) | static PyObject *
function PyObject (line 78) | PyObject *
function PyObject (line 88) | PyObject *
FILE: gcc-python-wrapper.c
function PyObject (line 108) | static PyObject*
type PyGccWrapper (line 195) | struct PyGccWrapper
function PyGccWrapper (line 201) | PyGccWrapper *
function PyGccWrapper_Track (line 219) | extern void
function PyGcc_wrapper_untrack (line 249) | void
function PyGccWrapper_Dealloc (line 279) | void
function my_walker (line 292) | static void
type ggc_root_tab (line 323) | struct ggc_root_tab
function PyGcc_wrapper_init (line 328) | void
function force_gcc_gc (line 337) | static void
function PyObject (line 347) | PyObject *
function PyObject (line 360) | PyObject *
FILE: gcc-python-wrappers.h
type plugin_event (line 90) | enum plugin_event
type PyGccCallgraphEdge (line 97) | struct PyGccCallgraphEdge
type PyGccCallgraphEdge (line 100) | struct PyGccCallgraphEdge
type PyGccCallgraphNode (line 103) | struct PyGccCallgraphNode
type PyGccCallgraphNode (line 106) | struct PyGccCallgraphNode
type PyGccCallgraphNode (line 109) | struct PyGccCallgraphNode
type PyGccCallgraphNode (line 112) | struct PyGccCallgraphNode
type opt_pass (line 132) | struct opt_pass
type PyGccLocation (line 139) | struct PyGccLocation
type PyGccLocation (line 142) | struct PyGccLocation
type PyGccLocation (line 148) | struct PyGccLocation
type PyGccBasicBlock (line 167) | struct PyGccBasicBlock
type tree_code (line 195) | enum tree_code
type PyGccTree (line 200) | struct PyGccTree
type PyGccTree (line 203) | struct PyGccTree
type PyGccTree (line 206) | struct PyGccTree
type PyGccTree (line 209) | struct PyGccTree
type PyGccTree (line 212) | struct PyGccTree
type PyGccTree (line 215) | struct PyGccTree
type PyGccTree (line 218) | struct PyGccTree
type PyGccTree (line 221) | struct PyGccTree
type PyGccTree (line 230) | struct PyGccTree
type PyGccTree (line 236) | struct PyGccTree
type PyGccTree (line 239) | struct PyGccTree
type PyGccTree (line 245) | struct PyGccTree
type PyGccFunction (line 251) | struct PyGccFunction
type PyGccFunction (line 254) | struct PyGccFunction
type PyGccTree (line 266) | struct PyGccTree
type PyGccTree (line 269) | struct PyGccTree
type PyGccTree (line 272) | struct PyGccTree
type PyGccTree (line 275) | struct PyGccTree
type PyGccTree (line 278) | struct PyGccTree
type PyGccTree (line 281) | struct PyGccTree
type PyGccTree (line 284) | struct PyGccTree
type PyGccTree (line 287) | struct PyGccTree
type PyGccTree (line 290) | struct PyGccTree
type PyGccTree (line 296) | struct PyGccTree
type PyGccTree (line 299) | struct PyGccTree
type PyGccTree (line 302) | struct PyGccTree
type PyGccTree (line 305) | struct PyGccTree
type PyGccTree (line 308) | struct PyGccTree
type PyGccTree (line 311) | struct PyGccTree
type PyGccTree (line 314) | struct PyGccTree
type PyGccTree (line 317) | struct PyGccTree
type PyGccTree (line 320) | struct PyGccTree
type PyGccTree (line 323) | struct PyGccTree
type PyGccTree (line 326) | struct PyGccTree
type PyGccTree (line 329) | struct PyGccTree
type PyGccTree (line 332) | struct PyGccTree
type PyGccTree (line 335) | struct PyGccTree
type PyGccTree (line 341) | struct PyGccTree
type PyGccTree (line 344) | struct PyGccTree
type PyGccTree (line 353) | struct PyGccTree
type PyGccTree (line 356) | struct PyGccTree
type PyGccGimple (line 360) | struct PyGccGimple
type PyGccGimple (line 363) | struct PyGccGimple
type PyGccGimple (line 366) | struct PyGccGimple
type PyGccGimple (line 369) | struct PyGccGimple
type PyGccGimple (line 372) | struct PyGccGimple
type PyGccGimple (line 375) | struct PyGccGimple
type PyGccGimple (line 378) | struct PyGccGimple
type PyGccGimple (line 381) | struct PyGccGimple
type PyGccGimple (line 384) | struct PyGccGimple
type PyGccGimple (line 387) | struct PyGccGimple
type PyGccGimple (line 390) | struct PyGccGimple
type PyGccGimple (line 396) | struct PyGccGimple
type PyGccGimple (line 399) | struct PyGccGimple
type PyGccGimple (line 402) | struct PyGccGimple
type PyGccGimple (line 405) | struct PyGccGimple
type PyGccGimple (line 411) | struct PyGccGimple
type PyGccGimple (line 414) | struct PyGccGimple
type opt_code (line 417) | enum opt_code
type cl_option (line 419) | struct cl_option
type PyGccPass (line 445) | struct PyGccPass
type PyGccPass (line 448) | struct PyGccPass
type PyGccPass (line 451) | struct PyGccPass
type PyGccPass (line 460) | struct PyGccPass
type PyGccPass (line 463) | struct PyGccPass
type PyGccPass (line 466) | struct PyGccPass
type PyGccPrettyPrinter (line 471) | struct PyGccPrettyPrinter {
type PyGccRtl (line 495) | struct PyGccRtl
type PyGccRtl (line 499) | struct PyGccRtl
type PyGccRtl (line 502) | struct PyGccRtl
type PyGccRtl (line 505) | struct PyGccRtl
type plugin_gcc_version (line 523) | struct plugin_gcc_version
FILE: gcc-python.c
function trace_callback (line 77) | static void
function PyObject (line 99) | __attribute__ ((weak));
function PyObject (line 136) | static PyObject *
function add_option_to_list (line 151) | static bool add_option_to_list(gcc_option opt, void *user_data)
function PyObject (line 169) | static PyObject *
function add_option_to_dict (line 188) | static bool add_option_to_dict(gcc_option opt, void *user_data)
function PyObject (line 209) | static PyObject *
function PyObject (line 230) | static PyObject *
function PyObject (line 267) | static PyObject *
function PyObject (line 274) | static PyObject *
function PyObject (line 290) | static PyObject *PyGcc_make_translation_unit_decl(gcc_translation_unit_d...
function PyObject (line 300) | static PyObject *
function PyObject (line 324) | static PyObject *
function PyObject (line 334) | static PyObject *
function PyObject (line 368) | static PyObject *
function PyObject (line 377) | static PyObject *
function PyObject (line 392) | static PyObject *
type PyModuleDef (line 519) | struct PyModuleDef
function PyMODINIT_FUNC (line 528) | PyMODINIT_FUNC PyInit_gcc(void)
function PyGcc_init_gcc_module (line 542) | static int
function PyGcc_run_any_command (line 616) | static void PyGcc_run_any_command(void)
function PyGcc_run_any_script (line 641) | static void PyGcc_run_any_script(void)
function setup_sys (line 668) | int
function on_plugin_finish (line 750) | void
type plugin_name_args (line 762) | struct plugin_name_args
type plugin_gcc_version (line 763) | struct plugin_gcc_version
function plugin_init (line 765) | int
function PyObject (line 874) | PyObject *
function PyObject (line 884) | PyObject *
function PyGcc_DoubleIntAsText (line 927) | void
function PyObject (line 941) | PyObject *
function PyGcc_PrintException (line 977) | void PyGcc_PrintException(const char *msg)
function PyObject (line 998) | PyObject *
FILE: gcc-python.h
type PyGccWrapper (line 82) | typedef struct PyGccWrapper
type PyGccWrapperTypeObject (line 100) | typedef struct PyGccWrapperTypeObject
type tree_code (line 322) | enum tree_code
type plugin_event (line 371) | enum plugin_event
FILE: gccutils/__init__.py
function sorted_dict_repr (line 20) | def sorted_dict_repr(d):
function get_src_for_loc (line 24) | def get_src_for_loc(loc):
function get_field_by_name (line 29) | def get_field_by_name(typeobj, name):
function get_global_typedef (line 36) | def get_global_typedef(name):
function get_variables_as_dict (line 49) | def get_variables_as_dict():
function get_global_vardecl_by_name (line 55) | def get_global_vardecl_by_name(name):
function get_nonnull_arguments (line 67) | def get_nonnull_arguments(funtype):
function invoke_dot (line 102) | def invoke_dot(dot, name='test'):
function pprint (line 125) | def pprint(obj):
function pformat (line 129) | def pformat(obj):
class PrettyPrinter (line 134) | class PrettyPrinter(object):
method __init__ (line 135) | def __init__(self):
method attr_to_str (line 138) | def attr_to_str(self, name, value):
method iter_tree_attrs (line 145) | def iter_tree_attrs(self, obj):
class TextualPrettyPrinter (line 169) | class TextualPrettyPrinter(PrettyPrinter):
method __init__ (line 172) | def __init__(self):
method pprint (line 176) | def pprint(self, obj):
method make_indent (line 180) | def make_indent(self, indent):
method pformat (line 183) | def pformat(self, obj):
method indent (line 186) | def indent(self, prefix, txt):
method _recursive_format_obj (line 189) | def _recursive_format_obj(self, obj, visited, depth):
class DotPrettyPrinter (line 229) | class DotPrettyPrinter(PrettyPrinter):
method to_html (line 232) | def to_html(self, text):
method _dot_td (line 248) | def _dot_td(self, text, align="left", colspan=1, escape=1, bgcolor=None,
method _dot_tr (line 260) | def _dot_tr(self, td_text):
class GraphvizHtmlFormatter (line 268) | class GraphvizHtmlFormatter(Formatter, DotPrettyPrinter):
method __init__ (line 273) | def __init__(self, style):
method style_for_token (line 277) | def style_for_token(self, token):
method format_unencoded (line 293) | def format_unencoded(self, tokensource, outfile):
function code_to_graphviz_html (line 330) | def code_to_graphviz_html(code):
class CfgPrettyPrinter (line 340) | class CfgPrettyPrinter(DotPrettyPrinter):
method __init__ (line 342) | def __init__(self, cfg, name=None):
method block_id (line 347) | def block_id(self, b):
method block_to_dot_label (line 354) | def block_to_dot_label(self, bb):
method code_to_html (line 385) | def code_to_html(self, code):
method stmt_to_html (line 391) | def stmt_to_html(self, stmt, stmtidx):
method edge_to_dot (line 423) | def edge_to_dot(self, e):
method extra_items (line 437) | def extra_items(self):
method to_dot (line 441) | def to_dot(self):
class TreePrettyPrinter (line 467) | class TreePrettyPrinter(DotPrettyPrinter):
method __init__ (line 470) | def __init__(self, root):
method tr_for_kv (line 477) | def tr_for_kv(self, key, value):
method label_for_tree (line 482) | def label_for_tree(self, obj):
method tree_id (line 502) | def tree_id(self, obj):
method tree_to_dot (line 505) | def tree_to_dot(self, obj):
method recursive_tree_to_dot (line 510) | def recursive_tree_to_dot(self, obj, visited, depth):
method to_dot (line 529) | def to_dot(self):
function cfg_to_dot (line 537) | def cfg_to_dot(cfg, name = None):
function tree_to_dot (line 542) | def tree_to_dot(tree):
class Table (line 546) | class Table(object):
method __init__ (line 548) | def __init__(self, columnheadings=None, rows=[], sepchar='-'):
method add_row (line 555) | def add_row(self, row):
method write (line 559) | def write(self, out):
method _calc_col_widths (line 573) | def _calc_col_widths(self):
method _calc_col_width (line 579) | def _calc_col_width(self, idx):
method _write_row (line 584) | def _write_row(self, out, colwidths, values):
method _write_separator (line 592) | def _write_separator(self, out, colwidths):
class CallgraphPrettyPrinter (line 599) | class CallgraphPrettyPrinter(DotPrettyPrinter):
method node_id (line 600) | def node_id(self, cgn):
method node_to_dot_label (line 603) | def node_to_dot_label(self, cgn):
method edge_to_dot (line 606) | def edge_to_dot(self, e):
method to_dot (line 613) | def to_dot(self):
function callgraph_to_dot (line 626) | def callgraph_to_dot():
function check_isinstance (line 630) | def check_isinstance(obj, types):
function sorted_callgraph (line 639) | def sorted_callgraph():
function topological_sort (line 653) | def topological_sort(nodes, get_srcs, get_dsts):
FILE: gccutils/dot.py
function to_html (line 18) | def to_html(text):
class Node (line 36) | class Node:
method to_html (line 37) | def to_html(self):
class Element (line 40) | class Element(Node):
method __init__ (line 41) | def __init__(self, children=None, **kwargs):
method to_html (line 49) | def to_html(self):
method add_child (line 61) | def add_child(self, child):
class Table (line 65) | class Table(Element):
method to_html (line 66) | def to_html(self):
class Tr (line 75) | class Tr(Element):
class Td (line 78) | class Td(Element):
class Text (line 81) | class Text(Node):
method __init__ (line 82) | def __init__(self, text):
method to_html (line 85) | def to_html(self):
class Br (line 88) | class Br(Element):
method to_html (line 89) | def to_html(self):
class Font (line 92) | class Font(Element):
FILE: gccutils/graph/__init__.py
class Graph (line 23) | class Graph(object):
method __init__ (line 26) | def __init__(self):
method add_node (line 30) | def add_node(self, node):
method add_edge (line 34) | def add_edge(self, srcnode, dstnode, *args, **kwargs):
method _make_edge (line 43) | def _make_edge(self, srcnode, dstnode):
method remove_node (line 46) | def remove_node(self, node):
method remove_edge (line 57) | def remove_edge(self, edge):
method to_dot (line 70) | def to_dot(self, name, ctxt=None):
method _nodes_to_dot (line 78) | def _nodes_to_dot(self, ctxt):
method _edges_to_dot (line 151) | def _edges_to_dot(self, ctxt):
method topologically_sorted_nodes (line 161) | def topologically_sorted_nodes(self):
method get_shortest_path (line 173) | def get_shortest_path(self, srcnode, dstnode):
class Node (line 253) | class Node(object):
method __init__ (line 256) | def __init__(self):
method to_dot_id (line 260) | def to_dot_id(self):
method to_dot_label (line 263) | def to_dot_label(self, ctxt):
method to_dot_html (line 273) | def to_dot_html(self, ctxt):
method get_subgraph_path (line 277) | def get_subgraph_path(self, ctxt):
method __lt__ (line 282) | def __lt__(self, other):
class Edge (line 285) | class Edge(object):
method __init__ (line 288) | def __init__(self, srcnode, dstnode):
method __repr__ (line 292) | def __repr__(self):
method __str__ (line 295) | def __str__(self):
method to_dot_label (line 298) | def to_dot_label(self, ctxt):
method to_dot_attrs (line 301) | def to_dot_attrs(self, ctxt):
class Subgraph (line 304) | class Subgraph(object):
method __init__ (line 307) | def __init__(self, id_, label):
method __eq__ (line 316) | def __eq__(self, other):
method __hash__ (line 321) | def __hash__(self):
method __str__ (line 324) | def __str__(self):
method __repr__ (line 327) | def __repr__(self):
method __lt__ (line 330) | def __lt__(self, other):
FILE: gccutils/graph/ivpgraph.py
class Callstring (line 30) | class Callstring:
method __init__ (line 36) | def __init__(self, callnodes):
method __str__ (line 39) | def __str__(self):
method __repr__ (line 46) | def __repr__(self):
method __eq__ (line 49) | def __eq__(self, other):
method __hash__ (line 52) | def __hash__(self):
method to_dot_id (line 55) | def to_dot_id(self):
class IvpGraph (line 59) | class IvpGraph(Graph):
method __init__ (line 62) | def __init__(self, sg, maxlength):
method _make_edge (line 191) | def _make_edge(self, srcnode, dstnode, edge):
method get_functions (line 194) | def get_functions(self):
method get_entry_nodes (line 198) | def get_entry_nodes(self):
class IvpNode (line 202) | class IvpNode(Node):
method __init__ (line 205) | def __init__(self, callstring, innernode):
method to_dot_html (line 210) | def to_dot_html(self, ctxt):
method __str__ (line 223) | def __str__(self):
method __repr__ (line 226) | def __repr__(self):
method supergraphnode (line 230) | def supergraphnode(self):
method stmt (line 234) | def stmt(self):
method function (line 238) | def function(self):
method get_gcc_loc (line 241) | def get_gcc_loc(self):
method get_subgraph_path (line 244) | def get_subgraph_path(self, ctxt):
class IvpEdge (line 255) | class IvpEdge(Edge):
method __init__ (line 258) | def __init__(self, srcnode, dstnode, inneredge):
method to_dot_label (line 262) | def to_dot_label(self, ctxt):
method to_dot_attrs (line 265) | def to_dot_attrs(self, ctxt):
method true_value (line 269) | def true_value(self):
method false_value (line 273) | def false_value(self):
method stmtedge (line 277) | def stmtedge(self):
FILE: gccutils/graph/query.py
class BaseQuery (line 27) | class BaseQuery:
method first (line 28) | def first(self):
method one (line 34) | def one(self):
method get_calls_of (line 46) | def get_calls_of(self, funcname):
method assigning_to (line 72) | def assigning_to(self, varname):
method assigning_constant (line 89) | def assigning_constant(self, constant):
method within (line 108) | def within(self, funcname):
class CompoundQuery (line 125) | class CompoundQuery(BaseQuery):
method __init__ (line 126) | def __init__(self, innerquery):
class Query (line 129) | class Query(BaseQuery):
method __init__ (line 130) | def __init__(self, graph):
method __iter__ (line 133) | def __iter__(self):
method __repr__ (line 137) | def __repr__(self):
method __str__ (line 140) | def __str__(self):
FILE: gccutils/graph/stmtgraph.py
class StmtGraph (line 28) | class StmtGraph(Graph):
method __init__ (line 37) | def __init__(self, fun, split_phi_nodes, omit_complex_edges=False):
method _make_edge (line 159) | def _make_edge(self, srcnode, dstnode, edge):
method get_entry_nodes (line 162) | def get_entry_nodes(self):
method get_node_for_labeldecl (line 165) | def get_node_for_labeldecl(self, labeldecl):
class StmtNode (line 170) | class StmtNode(Node):
method __init__ (line 173) | def __init__(self, fun, bb, stmt):
method __str__ (line 179) | def __str__(self):
method __repr__ (line 182) | def __repr__(self):
method __hash__ (line 185) | def __hash__(self):
method get_stmt (line 188) | def get_stmt(self):
method get_gcc_loc (line 191) | def get_gcc_loc(self):
method to_dot_html (line 197) | def to_dot_html(self, ctxt):
method __eq__ (line 217) | def __eq__(self, other):
class EntryNode (line 220) | class EntryNode(StmtNode):
method to_dot_html (line 223) | def to_dot_html(self, ctxt):
method __str__ (line 246) | def __str__(self):
method __repr__ (line 249) | def __repr__(self):
class ExitNode (line 252) | class ExitNode(StmtNode):
method __str__ (line 255) | def __str__(self):
method __repr__ (line 258) | def __repr__(self):
method returnnode (line 262) | def returnnode(self):
method returnval (line 272) | def returnval(self):
class SplitPhiNode (line 281) | class SplitPhiNode(StmtNode):
method __init__ (line 284) | def __init__(self, fun, stmt, inneredge):
method __str__ (line 299) | def __str__(self):
method __repr__ (line 302) | def __repr__(self):
method __eq__ (line 305) | def __eq__(self, other):
class StmtEdge (line 308) | class StmtEdge(Edge):
method __init__ (line 311) | def __init__(self, srcnode, dstnode, cfgedge, sortidx):
method to_dot_label (line 321) | def to_dot_label(self, ctx):
method true_value (line 345) | def true_value(self):
method false_value (line 350) | def false_value(self):
method __cmp__ (line 354) | def __cmp__(self, other):
FILE: gccutils/graph/supergraph.py
class Supergraph (line 25) | class Supergraph(Graph):
method __init__ (line 30) | def __init__(self, split_phi_nodes, add_fake_entry_node):
method add_node (line 142) | def add_node(self, supernode):
method _make_edge (line 148) | def _make_edge(self, srcnode, dstnode, cls, edge):
method get_entry_nodes (line 151) | def get_entry_nodes(self):
method get_functions (line 155) | def get_functions(self):
class SupergraphNode (line 159) | class SupergraphNode(Node):
method __init__ (line 165) | def __init__(self, innernode, stmtg):
method to_dot_html (line 170) | def to_dot_html(self, ctxt):
method __str__ (line 173) | def __str__(self):
method __repr__ (line 176) | def __repr__(self):
method supergraphnode (line 180) | def supergraphnode(self):
method stmtnode (line 184) | def stmtnode(self):
method stmt (line 188) | def stmt(self):
method get_stmt (line 192) | def get_stmt(self):
method get_gcc_loc (line 196) | def get_gcc_loc(self):
method get_subgraph_path (line 200) | def get_subgraph_path(self, ctxt):
method function (line 210) | def function(self):
class CallNode (line 217) | class CallNode(SupergraphNode):
class ReturnNode (line 226) | class ReturnNode(SupergraphNode):
class FakeEntryNode (line 235) | class FakeEntryNode(SupergraphNode):
method __str__ (line 245) | def __str__(self):
method __repr__ (line 248) | def __repr__(self):
method to_dot_html (line 251) | def to_dot_html(self, ctxt):
class SupergraphEdge (line 255) | class SupergraphEdge(Edge):
method __init__ (line 262) | def __init__(self, srcnode, dstnode, inneredge):
method to_dot_label (line 266) | def to_dot_label(self, ctxt):
method true_value (line 271) | def true_value(self):
method false_value (line 276) | def false_value(self):
method stmtedge (line 281) | def stmtedge(self):
class CallToReturnSiteEdge (line 284) | class CallToReturnSiteEdge(SupergraphEdge):
method to_dot_label (line 291) | def to_dot_label(self, ctxt):
method to_dot_attrs (line 294) | def to_dot_attrs(self, ctxt):
class CallToStart (line 297) | class CallToStart(SupergraphEdge):
method to_dot_label (line 304) | def to_dot_label(self, ctxt):
method to_dot_attrs (line 307) | def to_dot_attrs(self, ctxt):
class ExitToReturnSite (line 311) | class ExitToReturnSite(SupergraphEdge):
method to_dot_label (line 319) | def to_dot_label(self, ctxt):
method to_dot_attrs (line 322) | def to_dot_attrs(self, ctxt):
class FakeEntryEdge (line 326) | class FakeEntryEdge(SupergraphEdge):
method to_dot_label (line 335) | def to_dot_label(self, ctxt):
FILE: gccutils/selftests.py
function assertEqual (line 24) | def assertEqual(lhs, rhs):
function assertEndsWith (line 28) | def assertEndsWith(s, suffix):
FILE: generate-callgraph-c.py
function generate_callgraph_edge (line 33) | def generate_callgraph_edge():
function generate_callgraph_node (line 73) | def generate_callgraph_node():
FILE: generate-casts-c.py
function write_header (line 43) | def write_header(out):
function write_footer (line 48) | def write_footer(out):
function write_c (line 59) | def write_c(registry, c_out):
function write_h (line 94) | def write_h(registry, h_out):
function main (line 106) | def main(c_filename, h_filename, xmldir):
FILE: generate-cfg-c.py
function generate_edge (line 31) | def generate_edge():
function generate_basic_block (line 85) | def generate_basic_block():
function generate_cfg (line 138) | def generate_cfg():
FILE: generate-config-h.py
class GccPythonPluginConfigBuilder (line 23) | class GccPythonPluginConfigBuilder(ConfigBuilder):
method __init__ (line 24) | def __init__(self, argv):
method main (line 35) | def main(self):
method test_whether_built_with_cplusplus (line 64) | def test_whether_built_with_cplusplus(self):
method test_rtti (line 103) | def test_rtti(self):
method write_EXTRA_CFLAGS (line 118) | def write_EXTRA_CFLAGS(self):
FILE: generate-function-c.py
function generate_function (line 33) | def generate_function():
FILE: generate-gimple-c.py
function generate_gimple_struct_subclasses (line 159) | def generate_gimple_struct_subclasses():
function generate_gimple (line 186) | def generate_gimple():
function generate_gimple_subclasses (line 250) | def generate_gimple_subclasses():
function generate_gimple_code_map (line 442) | def generate_gimple_code_map():
FILE: generate-location-c.py
function generate_location (line 31) | def generate_location():
function generate_rich_location (line 130) | def generate_rich_location():
FILE: generate-option-c.py
function generate_option (line 33) | def generate_option():
FILE: generate-parameter-c.py
function generate_param (line 49) | def generate_param():
FILE: generate-pass-c.py
function generate_pass (line 32) | def generate_pass():
function generate_pass_subclasses (line 109) | def generate_pass_subclasses():
FILE: generate-passes-svg.py
function show_text_x_centered (line 46) | def show_text_x_centered(ctx, text, x, y):
function show_text_y_centered (line 52) | def show_text_y_centered(ctx, text, x, y):
class Property (line 58) | class Property:
method __init__ (line 59) | def __init__(self, flagname, color, x):
method render (line 68) | def render(self, ctx):
class PassInfo (line 106) | class PassInfo:
method __init__ (line 107) | def __init__(self, d, ps, parent):
method render (line 118) | def render(self, ctx):
class Phase (line 130) | class Phase:
method __init__ (line 131) | def __init__(self, rootname, base_y):
method add_pass (line 137) | def add_pass(self, ps, parent):
method render (line 157) | def render(self, ctx):
FILE: generate-pretty-printer-c.py
function generate_pretty_printer (line 28) | def generate_pretty_printer():
FILE: generate-rtl-c.py
function generate_rtl_base_class (line 45) | def generate_rtl_base_class():
function generate_intermediate_rtx_class_subclasses (line 103) | def generate_intermediate_rtx_class_subclasses():
function generate_concrete_rtx_code_subclasses (line 126) | def generate_concrete_rtx_code_subclasses():
function generate_rtl_code_map (line 155) | def generate_rtl_code_map():
FILE: generate-tables-of-passes-rst.py
function pass_properties_to_str (line 33) | def pass_properties_to_str(bitfield):
function foo (line 44) | def foo(t, ps, indent):
FILE: generate-tree-c.py
function generate_tree (line 52) | def generate_tree():
function generate_intermediate_tree_classes (line 135) | def generate_intermediate_tree_classes():
function generate_tree_code_classes (line 322) | def generate_tree_code_classes():
FILE: generate-variable-c.py
function generate_variable (line 30) | def generate_variable():
FILE: libcpychecker/PyArg_ParseTuple.py
function _type_of_simple_arg (line 46) | def _type_of_simple_arg(arg):
class TypeCheck (line 80) | class TypeCheck(FormatUnit):
method __init__ (line 84) | def __init__(self, code):
method get_expected_types (line 92) | def get_expected_types(self):
method get_other_type (line 97) | def get_other_type(self):
class TypeCheckCheckerType (line 102) | class TypeCheckCheckerType(AwkwardType):
method __init__ (line 103) | def __init__(self, typecheck):
method is_compatible (line 106) | def is_compatible(self, actual_type, actual_arg):
method describe (line 133) | def describe(self):
class TypeCheckResultType (line 136) | class TypeCheckResultType(AwkwardType):
method __init__ (line 137) | def __init__(self, typecheck):
method is_compatible (line 141) | def is_compatible(self, actual_type, actual_arg):
method describe (line 161) | def describe(self):
class Conversion (line 177) | class Conversion(FormatUnit):
method __init__ (line 181) | def __init__(self, code):
method get_expected_types (line 186) | def get_expected_types(self):
class ConverterCallbackType (line 191) | class ConverterCallbackType(AwkwardType):
method __init__ (line 192) | def __init__(self, conv):
method is_compatible (line 196) | def is_compatible(self, actual_type, actual_arg):
method describe (line 229) | def describe(self):
class ConverterResultType (line 232) | class ConverterResultType(AwkwardType):
method __init__ (line 233) | def __init__(self, conv):
method is_compatible (line 237) | def is_compatible(self, actual_type, actual_arg):
method describe (line 248) | def describe(self):
class PyArgParseFmt (line 256) | class PyArgParseFmt(ParsedFormatString):
method add_argument (line 261) | def add_argument(self, code, expected_types):
method num_expected (line 264) | def num_expected(self):
method iter_exp_types (line 267) | def iter_exp_types(self):
method from_string (line 277) | def from_string(cls, fmt_string, with_size_t):
FILE: libcpychecker/Py_BuildValue.py
function _type_of_simple_arg (line 48) | def _type_of_simple_arg(arg):
class AnyPyObjectPtr (line 103) | class AnyPyObjectPtr(AwkwardType):
method is_compatible (line 107) | def is_compatible(self, actual_type, actual_arg):
class ObjectFormatUnit (line 112) | class ObjectFormatUnit(FormatUnit):
method get_expected_types (line 116) | def get_expected_types(self):
class CodeSO (line 119) | class CodeSO(ObjectFormatUnit):
class CodeN (line 125) | class CodeN(ObjectFormatUnit):
class CompoundFmt (line 132) | class CompoundFmt:
method __init__ (line 133) | def __init__(self, opench, closech):
method __repr__ (line 138) | def __repr__(self):
method append (line 141) | def append(self, item):
method iter_exp_types (line 144) | def iter_exp_types(self):
class PyBuildValueFmt (line 153) | class PyBuildValueFmt(ParsedFormatString):
method __init__ (line 154) | def __init__(self, fmt_string):
method num_expected (line 158) | def num_expected(self):
method iter_exp_types (line 163) | def iter_exp_types(self):
method add_argument (line 176) | def add_argument(self, code, expected_types):
method add_complex_argument (line 179) | def add_complex_argument(self, arg):
method _do_open_compound_fmt (line 182) | def _do_open_compound_fmt(self, opench, closech):
method _do_close_compound_fmt (line 192) | def _do_close_compound_fmt(self, closech):
method from_string (line 200) | def from_string(cls, fmt_string, with_size_t):
FILE: libcpychecker/__init__.py
class CpyCheckerGimplePass (line 30) | class CpyCheckerGimplePass(gcc.GimplePass):
method __init__ (line 35) | def __init__(self,
method execute (line 68) | def execute(self, fun):
method _check_refcounts (line 97) | def _check_refcounts(self, fun):
class CpyCheckerIpaPass (line 104) | class CpyCheckerIpaPass(gcc.SimpleIpaPass):
method __init__ (line 109) | def __init__(self):
method execute (line 112) | def execute(self):
function main (line 115) | def main(**kwargs):
FILE: libcpychecker/absinterp.py
function raw_comparison (line 53) | def raw_comparison(a, opname, b):
function flip_opname (line 68) | def flip_opname(opname):
function dump_comparison (line 93) | def dump_comparison(f):
function debug_comparison (line 105) | def debug_comparison(msg):
function dump_comparison (line 109) | def dump_comparison(f):
class FnMeta (line 114) | class FnMeta(object):
method __init__ (line 125) | def __init__(self, **kwargs):
method desc_when_call_returns_value (line 131) | def desc_when_call_returns_value(self, valuedesc):
method desc_when_call_succeeds (line 140) | def desc_when_call_succeeds(self):
method desc_when_call_fails (line 149) | def desc_when_call_fails(self, why=None):
method desc_special (line 162) | def desc_special(self, event):
class AbstractValue (line 175) | class AbstractValue(object):
method __init__ (line 182) | def __init__(self, gcctype, loc):
method __str__ (line 190) | def __str__(self):
method __repr__ (line 199) | def __repr__(self):
method as_json (line 203) | def as_json(self, state):
method json_fields (line 211) | def json_fields(self, state):
method is_null_ptr (line 216) | def is_null_ptr(self):
method get_transitions_for_function_call (line 223) | def get_transitions_for_function_call(self, state, stmt):
method eval_unary_op (line 247) | def eval_unary_op(self, exprcode, gcctype, loc):
method eval_binop (line 255) | def eval_binop(self, exprcode, rhs, rhsdesc, gcctype, loc):
method eval_comparison (line 259) | def eval_comparison(self, opname, rhs, rhsdesc):
method extract_from_parent (line 266) | def extract_from_parent(self, region, gcctype, loc):
method as_string_constant (line 275) | def as_string_constant(self):
method union (line 291) | def union(self, v_other):
class EmptySet (line 296) | class EmptySet(AbstractValue):
method union (line 300) | def union(self, v_other):
class UnknownValue (line 304) | class UnknownValue(AbstractValue):
method make (line 309) | def make(cls, gcctype, loc):
method __str__ (line 325) | def __str__(self):
method __repr__ (line 334) | def __repr__(self):
method eval_unary_op (line 337) | def eval_unary_op(self, exprcode, gcctype, loc):
method eval_binop (line 340) | def eval_binop(self, exprcode, rhs, rhsdesc, gcctype, loc):
method eval_comparison (line 344) | def eval_comparison(self, opname, rhs, rhsdesc):
method extract_from_parent (line 351) | def extract_from_parent(self, region, gcctype, loc):
method union (line 354) | def union(self, v_other):
function eval_binop (line 358) | def eval_binop(exprcode, a, b, rhsvalue):
class ConcreteValue (line 414) | class ConcreteValue(AbstractValue):
method __init__ (line 420) | def __init__(self, gcctype, loc, value):
method from_int (line 430) | def from_int(self, value):
method __ne__ (line 433) | def __ne__(self, other):
method __str__ (line 438) | def __str__(self):
method __repr__ (line 446) | def __repr__(self):
method json_fields (line 450) | def json_fields(self, state):
method is_null_ptr (line 453) | def is_null_ptr(self):
method get_transitions_for_function_call (line 457) | def get_transitions_for_function_call(self, state, stmt):
method eval_unary_op (line 477) | def eval_unary_op(self, exprcode, gcctype, loc):
method eval_binop (line 505) | def eval_binop(self, exprcode, rhs, rhsdesc, gcctype, loc):
method eval_comparison (line 513) | def eval_comparison(self, opname, rhs, rhsdesc):
method extract_from_parent (line 652) | def extract_from_parent(self, region, gcctype, loc):
method union (line 655) | def union(self, v_other):
function value_to_str (line 668) | def value_to_str(value):
class WithinRange (line 683) | class WithinRange(AbstractValue):
method __init__ (line 689) | def __init__(self, gcctype, loc, *values):
method make (line 715) | def make(cls, gcctype, loc, *values):
method ge_zero (line 728) | def ge_zero(cls, gcctype, loc):
method __str__ (line 735) | def __str__(self):
method __repr__ (line 745) | def __repr__(self):
method json_fields (line 750) | def json_fields(self, state):
method eval_unary_op (line 754) | def eval_unary_op(self, exprcode, gcctype, loc):
method eval_binop (line 781) | def eval_binop(self, exprcode, rhs, rhsdesc, gcctype, loc):
method contains (line 818) | def contains(self, rawvalue):
method eval_comparison (line 823) | def eval_comparison(self, opname, rhs, rhsdesc):
method raise_split (line 847) | def raise_split(self, valuedesc, *new_ranges):
method raise_as_concrete (line 866) | def raise_as_concrete(self, loc, value, desc):
method extract_from_parent (line 883) | def extract_from_parent(self, region, gcctype, loc):
method union (line 886) | def union(self, v_other):
class PointerToRegion (line 898) | class PointerToRegion(AbstractValue):
method __init__ (line 902) | def __init__(self, gcctype, loc, region):
method __str__ (line 907) | def __str__(self):
method __repr__ (line 913) | def __repr__(self):
method json_fields (line 916) | def json_fields(self, state):
method eval_comparison (line 919) | def eval_comparison(self, opname, rhs, rhsdesc):
method eval_unary_op (line 934) | def eval_unary_op(self, exprcode, gcctype, loc):
class DeallocatedMemory (line 942) | class DeallocatedMemory(AbstractValue):
method __str__ (line 947) | def __str__(self):
method extract_from_parent (line 953) | def extract_from_parent(self, region, gcctype, loc):
class UninitializedData (line 956) | class UninitializedData(AbstractValue):
method __str__ (line 961) | def __str__(self):
method get_transitions_for_function_call (line 967) | def get_transitions_for_function_call(self, state, stmt):
method extract_from_parent (line 984) | def extract_from_parent(self, region, gcctype, loc):
function make_null_ptr (line 987) | def make_null_ptr(gcctype, loc):
class PredictedError (line 994) | class PredictedError(Exception):
class InvalidlyNullParameter (line 997) | class InvalidlyNullParameter(PredictedError):
method __init__ (line 1000) | def __init__(self, fnname, paramidx, nullvalue):
method __str__ (line 1005) | def __str__(self):
class PredictedValueError (line 1010) | class PredictedValueError(PredictedError):
method __init__ (line 1011) | def __init__(self, state, expr, value, isdefinite):
class PredictedArithmeticError (line 1020) | class PredictedArithmeticError(PredictedError):
method __init__ (line 1021) | def __init__(self, err, rhsvalue, isdefinite):
method __str__ (line 1027) | def __str__(self):
class UsageOfUninitializedData (line 1033) | class UsageOfUninitializedData(PredictedValueError):
method __init__ (line 1034) | def __init__(self, state, expr, value, desc):
method __str__ (line 1042) | def __str__(self):
class NullPtrDereference (line 1046) | class NullPtrDereference(PredictedValueError):
method __init__ (line 1047) | def __init__(self, state, expr, ptr, isdefinite):
method __str__ (line 1053) | def __str__(self):
class NullPtrArgument (line 1061) | class NullPtrArgument(PredictedValueError):
method __init__ (line 1062) | def __init__(self, state, stmt, idx, ptr, isdefinite, why):
method __str__ (line 1076) | def __str__(self):
class ReadFromDeallocatedMemory (line 1092) | class ReadFromDeallocatedMemory(PredictedError):
method __init__ (line 1093) | def __init__(self, stmt, value):
method __str__ (line 1099) | def __str__(self):
class PassingPointerToDeallocatedMemory (line 1103) | class PassingPointerToDeallocatedMemory(PredictedError):
method __init__ (line 1104) | def __init__(self, argidx, fnname, stmt, value):
method __str__ (line 1112) | def __str__(self):
function describe_stmt (line 1117) | def describe_stmt(stmt):
class Region (line 1125) | class Region(object):
method __init__ (line 1128) | def __init__(self, name, parent):
method __repr__ (line 1136) | def __repr__(self):
method as_json (line 1139) | def as_json(self):
method is_on_stack (line 1145) | def is_on_stack(self):
class RegionForGlobal (line 1152) | class RegionForGlobal(Region):
method __init__ (line 1159) | def __init__(self, vardecl):
method __repr__ (line 1164) | def __repr__(self):
method as_json (line 1167) | def as_json(self):
class RegionOnStack (line 1170) | class RegionOnStack(Region):
method __repr__ (line 1171) | def __repr__(self):
method __str__ (line 1174) | def __str__(self):
class RegionForLocal (line 1177) | class RegionForLocal(RegionOnStack):
method __init__ (line 1180) | def __init__(self, vardecl, stack):
method as_json (line 1184) | def as_json(self):
class RegionForStaticLocal (line 1187) | class RegionForStaticLocal(RegionForGlobal):
class RegionOnHeap (line 1192) | class RegionOnHeap(Region):
method __init__ (line 1198) | def __init__(self, name, alloc_stmt):
method __repr__ (line 1203) | def __repr__(self):
method __str__ (line 1206) | def __str__(self):
class RegionForStringConstant (line 1210) | class RegionForStringConstant(Region):
method __init__ (line 1217) | def __init__(self, text):
method as_json (line 1221) | def as_json(self):
class ArrayElementRegion (line 1224) | class ArrayElementRegion(Region):
method __init__ (line 1227) | def __init__(self, name, parent, index):
class MissingValue (line 1231) | class MissingValue(Exception):
method __init__ (line 1236) | def __init__(self, region):
method __str__ (line 1239) | def __str__(self):
class SplitValue (line 1242) | class SplitValue(Exception):
method __init__ (line 1250) | def __init__(self, value, altvalues, descriptions):
method __str__ (line 1255) | def __str__(self):
method split (line 1260) | def split(self, state):
class Facet (line 1280) | class Facet(object):
method __init__ (line 1294) | def __init__(self, state):
method copy (line 1298) | def copy(self, newstate):
class State (line 1302) | class State(object):
method __init__ (line 1330) | def __init__(self, stmtgraph, stmtnode, lastgccloc,
method __str__ (line 1360) | def __str__(self):
method __repr__ (line 1366) | def __repr__(self):
method as_str_table (line 1372) | def as_str_table(self):
method as_json (line 1384) | def as_json(self, desc):
method log (line 1396) | def log(self, logger):
method copy (line 1411) | def copy(self):
method verify (line 1429) | def verify(self):
method eval_lvalue (line 1439) | def eval_lvalue(self, expr, loc):
method eval_rvalue (line 1479) | def eval_rvalue(self, expr, loc):
method assign (line 1562) | def assign(self, lhs, rhs, loc):
method var_region (line 1575) | def var_region(self, var):
method element_region (line 1592) | def element_region(self, ar, loc):
method pointer_plus_region (line 1610) | def pointer_plus_region(self, stmt):
method _array_region (line 1642) | def _array_region(self, parent, index):
method get_field_region (line 1659) | def get_field_region(self, cr, loc): #target, field):
method string_constant_region (line 1682) | def string_constant_region(self, expr, loc):
method get_store (line 1690) | def get_store(self, region, gcctype, loc):
method summarize_array (line 1710) | def summarize_array(self, r_array, v_range, gcctype, loc):
method _get_store_recursive (line 1742) | def _get_store_recursive(self, region, gcctype, loc):
method make_heap_region (line 1772) | def make_heap_region(self, name, stmt):
method make_field_region (line 1778) | def make_field_region(self, target, field):
method get_value_of_field_by_varname (line 1795) | def get_value_of_field_by_varname(self, varname, field):
method get_value_of_field_by_region (line 1809) | def get_value_of_field_by_region(self, region, field):
method read_field_by_name (line 1826) | def read_field_by_name(self, stmt, gcctype, region, fieldname):
method set_field_by_name (line 1851) | def set_field_by_name(self, r_struct, fieldname, v_field):
method dereference (line 1855) | def dereference(self, expr, v_ptr, loc):
method init_for_function (line 1872) | def init_for_function(self, fun):
method mktrans_assignment (line 1917) | def mktrans_assignment(self, lhs, rhs, desc):
method update_stmt_node (line 1930) | def update_stmt_node(self, new_stmt_node):
method use_next_stmt_node (line 1939) | def use_next_stmt_node(self):
method get_gcc_loc_or_none (line 1951) | def get_gcc_loc_or_none(self):
method get_gcc_loc (line 1957) | def get_gcc_loc(self, fun):
method raise_any_null_ptr_deref (line 1973) | def raise_any_null_ptr_deref(self, expr, ptr):
method raise_any_null_ptr_func_arg (line 1990) | def raise_any_null_ptr_func_arg(self, stmt, idx, ptr, why=None):
method raise_split_value (line 2009) | def raise_split_value(self, ptr_rvalue, loc=None):
method deallocate_region (line 2032) | def deallocate_region(self, stmt, region):
method get_transitions (line 2045) | def get_transitions(self):
method _get_transitions_for_stmt (line 2059) | def _get_transitions_for_stmt(self, stmt):
method mkstate_nop (line 2085) | def mkstate_nop(self, stmt):
method mkstate_return_of (line 2093) | def mkstate_return_of(self, stmt, v_return):
method mkstate_concrete_return_of (line 2106) | def mkstate_concrete_return_of(self, stmt, value):
method mktrans_nop (line 2119) | def mktrans_nop(self, stmt, fnname):
method mktrans_not_returning (line 2129) | def mktrans_not_returning(self, desc):
method mktrans_from_fncall_state (line 2136) | def mktrans_from_fncall_state(self, stmt, state, partialdesc, has_sibl...
method make_transitions_for_fncall (line 2151) | def make_transitions_for_fncall(self, stmt, fnmeta, s_success, s_failu...
method eval_stmt_args (line 2171) | def eval_stmt_args(self, stmt):
method _get_transitions_for_GimpleCall (line 2176) | def _get_transitions_for_GimpleCall(self, stmt):
method get_function_name (line 2290) | def get_function_name(self, stmt):
method apply_fncall_side_effects (line 2309) | def apply_fncall_side_effects(self, transitions, stmt):
method _get_transitions_for_GimpleCond (line 2385) | def _get_transitions_for_GimpleCond(self, stmt):
method eval_condition (line 2427) | def eval_condition(self, stmt, expr_lhs, exprcode, expr_rhs):
method eval_binop_args (line 2489) | def eval_binop_args(self, stmt):
method eval_rhs (line 2497) | def eval_rhs(self, stmt):
method _get_transitions_for_GimpleAssign (line 2575) | def _get_transitions_for_GimpleAssign(self, stmt):
method _get_transitions_for_GimpleReturn (line 2593) | def _get_transitions_for_GimpleReturn(self, stmt):
method _get_transitions_for_GimpleSwitch (line 2608) | def _get_transitions_for_GimpleSwitch(self, stmt):
method _get_transitions_for_GimpleAsm (line 2641) | def _get_transitions_for_GimpleAsm(self, stmt):
method get_persistent_refs_for_region (line 2652) | def get_persistent_refs_for_region(self, dst_region):
method get_all_refs_for_region (line 2663) | def get_all_refs_for_region(self, dst_region):
class Transition (line 2676) | class Transition(object):
method __init__ (line 2682) | def __init__(self, src, dest, desc):
method __repr__ (line 2691) | def __repr__(self):
method log (line 2694) | def log(self, logger):
class Trace (line 2699) | class Trace(object):
method __init__ (line 2703) | def __init__(self):
method add (line 2711) | def add(self, transition):
method add_error (line 2720) | def add_error(self, err):
method copy (line 2723) | def copy(self):
method log (line 2731) | def log(self, logger, name):
method get_last_stmt (line 2739) | def get_last_stmt(self):
method return_value (line 2742) | def return_value(self):
method has_looped (line 2745) | def has_looped(self):
method get_all_var_region_pairs (line 2775) | def get_all_var_region_pairs(self):
method var_points_unambiguously_to (line 2787) | def var_points_unambiguously_to(self, r_srcptr, r_dstptr):
method get_description_for_region (line 2826) | def get_description_for_region(self, r_in):
function true_edge (line 2845) | def true_edge(stmtnode):
function false_edge (line 2850) | def false_edge(stmtnode):
function process_splittable_transitions (line 2855) | def process_splittable_transitions(transitions, callback):
class Resources (line 2879) | class Resources:
method __init__ (line 2881) | def __init__(self):
method copy (line 2888) | def copy(self):
method acquire (line 2894) | def acquire(self, resource):
method release (line 2897) | def release(self, resource):
method log (line 2900) | def log(self, logger):
class TooComplicated (line 2905) | class TooComplicated(Exception):
method __init__ (line 2914) | def __init__(self, complete_traces):
class Limits (line 2918) | class Limits:
method __init__ (line 2922) | def __init__(self, maxtrans):
method on_transition (line 2926) | def on_transition(self, transition, result):
function iter_traces (line 2937) | def iter_traces(stmtgraph, facets, prefix=None, limits=None, depth=0):
class StateGraph (line 3046) | class StateGraph:
method __init__ (line 3054) | def __init__(self, fun, logger, stateclass):
method _gather_states (line 3072) | def _gather_states(self, curstate, logger):
method get_prev_state (line 3113) | def get_prev_state(self, state):
function extra_text (line 3121) | def extra_text(msg, indent):
FILE: libcpychecker/attributes.py
function register_our_attributes (line 38) | def register_our_attributes():
FILE: libcpychecker/c_stdio.py
class InternalCheckerError (line 24) | class InternalCheckerError(Exception):
class UnrecognizedFunction (line 27) | class UnrecognizedFunction(InternalCheckerError):
method __init__ (line 28) | def __init__(self, fnname):
method __str__ (line 31) | def __str__(self):
class NonNullFilePtr (line 39) | class NonNullFilePtr(AbstractValue):
method __init__ (line 40) | def __init__(self, stmt):
method __str__ (line 43) | def __str__(self):
method __repr__ (line 46) | def __repr__(self):
function handle_c_stdio_function (line 49) | def handle_c_stdio_function(state, fnname, stmt):
FILE: libcpychecker/compat.py
class CouldNotFindVarDecl (line 39) | class CouldNotFindVarDecl(RuntimeError):
method __init__ (line 40) | def __init__(self, varname):
method __str__ (line 42) | def __str__(self):
function on_finish_decl (line 51) | def on_finish_decl(*args):
function _get_exception_decl_by_name (line 66) | def _get_exception_decl_by_name(exc_name):
function _get_typeobject_decl_by_name (line 69) | def _get_typeobject_decl_by_name(typeobjname):
function _get_exception_decl_by_name (line 76) | def _get_exception_decl_by_name(exc_name):
function _get_typeobject_decl_by_name (line 79) | def _get_typeobject_decl_by_name(typeobjname):
function get_exception_decl_by_name (line 82) | def get_exception_decl_by_name(exc_name):
function get_typeobject_decl_by_name (line 88) | def get_typeobject_decl_by_name(typeobjname):
FILE: libcpychecker/diagnostics.py
class Annotator (line 31) | class Annotator:
method get_notes (line 39) | def get_notes(self, transition):
class TestAnnotator (line 46) | class TestAnnotator(Annotator):
method get_notes (line 51) | def get_notes(self, transition):
function describe_trace (line 62) | def describe_trace(trace, report, annotator):
class Reporter (line 93) | class Reporter:
method __init__ (line 102) | def __init__(self):
method make_warning (line 106) | def make_warning(self, fun, loc, msg):
method make_debug_dump (line 119) | def make_debug_dump(self, fun, loc, msg):
method got_warnings (line 126) | def got_warnings(self):
method to_json (line 129) | def to_json(self, fun):
method dump_json (line 140) | def dump_json(self, fun, filename):
method to_html (line 148) | def to_html(self, fun):
method dump_html (line 157) | def dump_html(self, fun, filename):
method remove_duplicates (line 162) | def remove_duplicates(self):
method flush (line 184) | def flush(self):
class SavedDiagnostic (line 188) | class SavedDiagnostic:
method __init__ (line 193) | def __init__(self, loc, msg):
class SavedWarning (line 199) | class SavedWarning(SavedDiagnostic):
method flush (line 200) | def flush(self):
class SavedInform (line 203) | class SavedInform(SavedDiagnostic):
method flush (line 204) | def flush(self):
class Report (line 207) | class Report:
method __init__ (line 211) | def __init__(self, fun, loc, msg):
method add_warning (line 224) | def add_warning(self, loc, msg):
method add_inform (line 228) | def add_inform(self, loc, msg):
method flush (line 232) | def flush(self):
method add_trace (line 237) | def add_trace(self, trace, annotator=None):
method add_note (line 242) | def add_note(self, loc, msg):
method get_annotator_for_trace (line 253) | def get_annotator_for_trace(self, trace):
method is_duplicate_of (line 256) | def is_duplicate_of(self, other):
method add_duplicate (line 271) | def add_duplicate(self, other):
method to_json (line 276) | def to_json(self, fun):
class Note (line 296) | class Note:
method __init__ (line 300) | def __init__(self, loc, msg):
function location_as_json (line 305) | def location_as_json(loc):
function type_as_json (line 314) | def type_as_json(t):
FILE: libcpychecker/formatstrings.py
function get_char_ptr (line 27) | def get_char_ptr():
function get_const_char_ptr (line 30) | def get_const_char_ptr():
function get_const_char_ptr_ptr (line 33) | def get_const_char_ptr_ptr():
function get_hash_size_type (line 41) | def get_hash_size_type(with_size_t):
class NullPointer (line 48) | class NullPointer:
method describe (line 50) | def describe(self):
class CExtensionWarning (line 53) | class CExtensionWarning(Exception):
class FormatStringWarning (line 57) | class FormatStringWarning(CExtensionWarning):
method __init__ (line 58) | def __init__(self, fmt_string):
method emit_as_warning (line 61) | def emit_as_warning(self, loc):
method extra_info (line 65) | def extra_info(self):
class UnknownFormatChar (line 68) | class UnknownFormatChar(FormatStringWarning):
method __init__ (line 69) | def __init__(self, fmt_string, ch):
method __str__ (line 73) | def __str__(self):
class UnhandledCode (line 76) | class UnhandledCode(UnknownFormatChar):
method __str__ (line 77) | def __str__(self):
class MismatchedParentheses (line 81) | class MismatchedParentheses(FormatStringWarning):
method __str__ (line 82) | def __str__(self):
class ParsedFormatStringWarning (line 85) | class ParsedFormatStringWarning(FormatStringWarning):
method __init__ (line 86) | def __init__(self, funcname, fmt):
class FormatUnit (line 91) | class FormatUnit:
method __init__ (line 95) | def __init__(self, code):
method get_expected_types (line 98) | def get_expected_types(self):
class ConcreteUnit (line 103) | class ConcreteUnit(FormatUnit):
method __init__ (line 108) | def __init__(self, code, expected_types):
method get_expected_types (line 112) | def get_expected_types(self):
method __repr__ (line 115) | def __repr__(self):
class AwkwardType (line 118) | class AwkwardType:
method is_compatible (line 123) | def is_compatible(self, actual_type, actual_arg):
method describe (line 126) | def describe(self):
class ParsedFormatString (line 129) | class ParsedFormatString:
method __init__ (line 133) | def __init__(self, fmt_string):
method __repr__ (line 137) | def __repr__(self):
class WrongNumberOfVars (line 141) | class WrongNumberOfVars(ParsedFormatStringWarning):
method __init__ (line 142) | def __init__(self, funcname, fmt, varargs):
method __str__ (line 146) | def __str__(self):
method extra_info (line 152) | def extra_info(self):
method _get_desc_prefix (line 165) | def _get_desc_prefix(self):
class NotEnoughVars (line 168) | class NotEnoughVars(WrongNumberOfVars):
method _get_desc_prefix (line 169) | def _get_desc_prefix(self):
class TooManyVars (line 172) | class TooManyVars(WrongNumberOfVars):
method _get_desc_prefix (line 173) | def _get_desc_prefix(self):
class MismatchingType (line 176) | class MismatchingType(ParsedFormatStringWarning):
method __init__ (line 177) | def __init__(self, funcname, fmt, arg_num, arg_fmt_string, exp_type, v...
method extra_info (line 184) | def extra_info(self):
method __str__ (line 199) | def __str__(self):
function describe_precision (line 203) | def describe_precision(t):
function describe_type (line 209) | def describe_type(t):
function compatible_type (line 231) | def compatible_type(exp_type, actual_type, actualarg=None):
function check_pyargs (line 322) | def check_pyargs(fun):
FILE: libcpychecker/initializers.py
function check_initializers (line 26) | def check_initializers():
class StructInitializer (line 31) | class StructInitializer(object):
method __init__ (line 32) | def __init__(self, ctor):
method __repr__ (line 42) | def __repr__(self):
method int_field (line 47) | def int_field(self, fieldname):
method char_ptr_field (line 58) | def char_ptr_field(self, fieldname):
method function_ptr_field (line 73) | def function_ptr_field(self, fieldname):
class PyMethodDefInitializer (line 92) | class PyMethodDefInitializer(StructInitializer):
method get_location (line 93) | def get_location(self):
function verify_any_PyMethodDef_flags (line 106) | def verify_any_PyMethodDef_flags():
function get_all_PyMethodDef_initializers (line 149) | def get_all_PyMethodDef_initializers():
class PyTypeObjectInitializer (line 179) | class PyTypeObjectInitializer(StructInitializer):
function get_all_PyTypeObject_initializers (line 182) | def get_all_PyTypeObject_initializers():
FILE: libcpychecker/refcounts.py
function stmt_is_assignment_to_count (line 43) | def stmt_is_assignment_to_count(stmt):
function type_is_pyobjptr (line 54) | def type_is_pyobjptr(t):
function type_is_pyobjptr_subclass (line 59) | def type_is_pyobjptr_subclass(t):
function stmt_is_assignment_to_objptr (line 110) | def stmt_is_assignment_to_objptr(stmt):
function stmt_is_return_of_objptr (line 116) | def stmt_is_return_of_objptr(stmt):
function make_null_pyobject_ptr (line 122) | def make_null_pyobject_ptr(stmt):
class FunctionCall (line 129) | class FunctionCall:
method __init__ (line 131) | def __init__(self, s_src, stmt, fnmeta, args=None, varargs=None):
method crashes_on_null_arg (line 142) | def crashes_on_null_arg(self, argidx, why):
method never_returns (line 145) | def never_returns(self):
method add_outcome (line 149) | def add_outcome(self, desc, s_new=None):
method always (line 157) | def always(self):
method can_succeed (line 161) | def can_succeed(self):
method can_fail (line 164) | def can_fail(self):
method can_succeed_new_ref (line 167) | def can_succeed_new_ref(self, name=None, typeobjregion=None):
method new_ref_or_fail (line 176) | def new_ref_or_fail(self, objname=None):
method get_transitions (line 186) | def get_transitions(self):
method _make_transition (line 211) | def _make_transition(self, oc):
class Outcome (line 215) | class Outcome:
method __init__ (line 218) | def __init__(self, fncall, desc, state):
method __str__ (line 227) | def __str__(self):
method get_stmt (line 230) | def get_stmt(self):
method get_return_type (line 233) | def get_return_type(self):
method returns (line 236) | def returns(self, value):
method returns_ptr (line 241) | def returns_ptr(self, region):
method returns_NULL (line 247) | def returns_NULL(self):
method _returns (line 252) | def _returns(self, v_return):
method sets_exception (line 259) | def sets_exception(self, exc_name):
method sets_exception_ptr (line 262) | def sets_exception_ptr(self, v_ptr):
method adds_external_ref (line 265) | def adds_external_ref(self, v_ptr):
class RefcountValue (line 272) | class RefcountValue(AbstractValue):
method __init__ (line 297) | def __init__(self, loc, r_obj, relvalue, external):
method new_ref (line 309) | def new_ref(cls, loc, r_obj):
method borrowed_ref (line 316) | def borrowed_ref(cls, loc, r_obj):
method get_min_value (line 322) | def get_min_value(self):
method __str__ (line 325) | def __str__(self):
method __repr__ (line 342) | def __repr__(self):
method get_referrers_as_json (line 345) | def get_referrers_as_json(self, state):
method json_fields (line 366) | def json_fields(self, state):
method eval_binop (line 374) | def eval_binop(self, exprcode, rhs, rhsdesc, gcctype, loc):
method eval_comparison (line 384) | def eval_comparison(self, opname, rhs, rhsdesc):
class GenericTpDealloc (line 422) | class GenericTpDealloc(AbstractValue):
method get_transitions_for_function_call (line 427) | def get_transitions_for_function_call(self, state, stmt):
function invokes_Py_TYPE (line 463) | def invokes_Py_TYPE(fnmeta, within=None):
function invokes_Py_TYPE_via_macro (line 472) | def invokes_Py_TYPE_via_macro(fnmeta, macro):
function invokes_Py_INCREF (line 481) | def invokes_Py_INCREF(fnmeta):
class CPython (line 488) | class CPython(Facet):
method __init__ (line 491) | def __init__(self, state, exception_rvalue=None,
method copy (line 505) | def copy(self, newstate):
method init_for_function (line 511) | def init_for_function(self, fun):
method get_refcount (line 542) | def get_refcount(self, v_pyobjectptr, stmt):
method change_refcount (line 554) | def change_refcount(self, pyobjectptr, loc, fn):
method add_ref (line 578) | def add_ref(self, pyobjectptr, loc):
method add_external_ref (line 592) | def add_external_ref(self, pyobjectptr, loc):
method dec_ref (line 609) | def dec_ref(self, pyobjectptr, loc):
method mktransitions_Py_DECREF (line 625) | def mktransitions_Py_DECREF(self, v_pyobjectptr, stmt):
method set_exception (line 658) | def set_exception(self, exc_name, loc):
method bad_internal_call (line 674) | def bad_internal_call(self, loc):
method bad_argument (line 681) | def bad_argument(self, loc):
method typeobjregion_by_name (line 687) | def typeobjregion_by_name(self, typeobjname):
method object_ctor (line 703) | def object_ctor(self, stmt, typename, typeobjname):
method object_ctor_bytes (line 737) | def object_ctor_bytes(self, stmt):
method steal_reference (line 752) | def steal_reference(self, pyobjectptr, loc):
method make_sane_object (line 770) | def make_sane_object(self, stmt, name, v_refcount, r_typeobj=None):
method mkstate_new_ref (line 818) | def mkstate_new_ref(self, stmt, name, typeobjregion=None):
method mkstate_borrowed_ref (line 839) | def mkstate_borrowed_ref(self, stmt, fnmeta, r_typeobj=None):
method mkstate_exception (line 856) | def mkstate_exception(self, stmt):
method make_transitions_for_new_ref_or_fail (line 868) | def make_transitions_for_new_ref_or_fail(self, stmt, fnmeta, objname=N...
method make_transitions_for_borrowed_ref_or_fail (line 886) | def make_transitions_for_borrowed_ref_or_fail(self, stmt, fnmeta):
method object_ptr_has_global_ob_type (line 899) | def object_ptr_has_global_ob_type(self, v_object_ptr, vardecl_name):
method iter_python_refcounts (line 914) | def iter_python_refcounts(self):
method handle_null_error (line 935) | def handle_null_error(self, stmt, idx, ptr, rawreturnvalue=0):
method handle_BadInternalCall_on_null (line 971) | def handle_BadInternalCall_on_null(self, stmt, idx, ptr, v_return):
method impl___cpychecker_log (line 998) | def impl___cpychecker_log(self, stmt, *args):
method impl___cpychecker_dump (line 1011) | def impl___cpychecker_dump(self, stmt, *args):
method impl___cpychecker_dump_all (line 1021) | def impl___cpychecker_dump_all(self, stmt, *args):
method impl___cpychecker_assert_equal (line 1032) | def impl___cpychecker_assert_equal(self, stmt, *args):
method _handle_PyArg_function (line 1056) | def _handle_PyArg_function(self, stmt, fnmeta, v_fmt, v_varargs, with_...
method impl_PyArg_Parse (line 1132) | def impl_PyArg_Parse(self, stmt, v_args, v_fmt, *v_varargs):
method impl__PyArg_Parse_SizeT (line 1142) | def impl__PyArg_Parse_SizeT(self, stmt, v_args, v_fmt, *v_varargs):
method impl_PyArg_ParseTuple (line 1152) | def impl_PyArg_ParseTuple(self, stmt, v_args, v_fmt, *v_varargs):
method impl__PyArg_ParseTuple_SizeT (line 1163) | def impl__PyArg_ParseTuple_SizeT(self, stmt, v_args, v_fmt, *v_varargs):
method impl_PyArg_ParseTupleAndKeywords (line 1174) | def impl_PyArg_ParseTupleAndKeywords(self, stmt, v_args, v_kwargs,
method impl__PyArg_ParseTupleAndKeywords_SizeT (line 1188) | def impl__PyArg_ParseTupleAndKeywords_SizeT(self, stmt, v_args, v_kwargs,
method impl_PyArg_UnpackTuple (line 1202) | def impl_PyArg_UnpackTuple(self, stmt, v_args, v_name, v_min, v_max,
method impl_Py_AtExit (line 1265) | def impl_Py_AtExit(self, stmt, v_func):
method impl_PyBool_FromLong (line 1279) | def impl_PyBool_FromLong(self, stmt, v_long):
method _handle_Py_BuildValue (line 1295) | def _handle_Py_BuildValue(self, stmt, fnmeta, v_fmt, v_varargs, with_s...
method impl_Py_BuildValue (line 1349) | def impl_Py_BuildValue(self, stmt, v_fmt, *args):
method impl__Py_BuildValue_SizeT (line 1361) | def impl__Py_BuildValue_SizeT(self, stmt, v_fmt, *args):
method impl_PyCallable_Check (line 1379) | def impl_PyCallable_Check(self, stmt, v_o):
method impl_PyCapsule_GetPointer (line 1397) | def impl_PyCapsule_GetPointer(self, stmt, v_capsule, v_name):
method impl_PyCObject_AsVoidPtr (line 1419) | def impl_PyCObject_AsVoidPtr(self, stmt, v_self):
method mktrans_cobject_deprecation_warning (line 1432) | def mktrans_cobject_deprecation_warning(self, fnmeta, stmt):
method impl_PyCObject_FromVoidPtr (line 1460) | def impl_PyCObject_FromVoidPtr(self, stmt, v_cobj, v_destr):
method impl_PyCObject_FromVoidPtrAndDesc (line 1476) | def impl_PyCObject_FromVoidPtrAndDesc(self, stmt, v_cobj, v_desc, v_de...
method impl_PyCode_New (line 1496) | def impl_PyCode_New(self, stmt,
method impl_PyDict_GetItem (line 1524) | def impl_PyDict_GetItem(self, stmt, v_mp, v_key):
method impl_PyDict_GetItemString (line 1547) | def impl_PyDict_GetItemString(self, stmt, v_dp, v_key):
method impl_PyDict_New (line 1576) | def impl_PyDict_New(self, stmt):
method _handle_PyDict_SetItem (line 1584) | def _handle_PyDict_SetItem(self, stmt, fnmeta,
method impl_PyDict_SetItem (line 1598) | def impl_PyDict_SetItem(self, stmt, v_dp, v_key, v_item):
method impl_PyDict_SetItemString (line 1617) | def impl_PyDict_SetItemString(self, stmt, v_dp, v_key, v_item):
method impl_PyDict_Size (line 1634) | def impl_PyDict_Size(self, stmt, v_mp):
method impl_PyErr_Clear (line 1661) | def impl_PyErr_Clear(self, stmt):
method impl_PyErr_Format (line 1672) | def impl_PyErr_Format(self, stmt, v_exc, v_fmt, *v_args):
method impl_PyErr_NewException (line 1685) | def impl_PyErr_NewException(self, stmt, v_name, v_base, v_dict):
method impl_PyErr_NoMemory (line 1699) | def impl_PyErr_NoMemory(self, stmt):
method impl_PyErr_Occurred (line 1713) | def impl_PyErr_Occurred(self, stmt):
method impl_PyErr_Print (line 1725) | def impl_PyErr_Print(self, stmt):
method impl_PyErr_PrintEx (line 1737) | def impl_PyErr_PrintEx(self, stmt, v_int):
method impl_PyErr_SetFromErrno (line 1750) | def impl_PyErr_SetFromErrno(self, stmt, v_exc):
method impl_PyErr_SetFromErrnoWithFilename (line 1761) | def impl_PyErr_SetFromErrnoWithFilename(self, stmt, v_exc, v_filename):
method impl_PyErr_SetNone (line 1776) | def impl_PyErr_SetNone(self, stmt, v_exc):
method impl_PyErr_SetObject (line 1790) | def impl_PyErr_SetObject(self, stmt, v_exc, v_value):
method impl_PyErr_SetString (line 1807) | def impl_PyErr_SetString(self, stmt, v_exc, v_string):
method impl_PyErr_WarnEx (line 1818) | def impl_PyErr_WarnEx(self, stmt, v_category, v_text, v_stack_level):
method impl_PyEval_CallMethod (line 1840) | def impl_PyEval_CallMethod(self, stmt, v_obj, v_method, v_fmt, *v_vara...
method impl_PyEval_CallObjectWithKeywords (line 1855) | def impl_PyEval_CallObjectWithKeywords(self, stmt, v_func, v_arg, v_kw):
method impl_PyEval_InitThreads (line 1870) | def impl_PyEval_InitThreads(self, stmt):
method impl_PyEval_RestoreThread (line 1876) | def impl_PyEval_RestoreThread(self, stmt, v_tstate):
method impl_PyEval_SaveThread (line 1888) | def impl_PyEval_SaveThread(self, stmt):
method impl_Py_FatalError (line 1907) | def impl_Py_FatalError(self, stmt, v_message):
method impl_PyFile_SoftSpace (line 1918) | def impl_PyFile_SoftSpace(self, stmt, v_f, v_newflag):
method impl_PyFile_WriteObject (line 1928) | def impl_PyFile_WriteObject(self, stmt, v_obj, v_p, v_flags):
method impl_PyFile_WriteString (line 1944) | def impl_PyFile_WriteString(self, stmt, v_s, v_p):
method impl_Py_Finalize (line 1959) | def impl_Py_Finalize(self, stmt):
method impl_PyFloat_AsDouble (line 1968) | def impl_PyFloat_AsDouble(self, stmt, v_op):
method impl_PyFloat_FromDouble (line 2012) | def impl_PyFloat_FromDouble(self, stmt, v_fval):
method impl_PyFrame_New (line 2030) | def impl_PyFrame_New(self, stmt,
method impl_Py_GetVersion (line 2049) | def impl_Py_GetVersion(self, stmt):
method impl_PyGILState_Ensure (line 2065) | def impl_PyGILState_Ensure(self, stmt):
method impl_PyGILState_Release (line 2074) | def impl_PyGILState_Release(self, stmt, v_state):
method impl_PyImport_AddModule (line 2083) | def impl_PyImport_AddModule(self, stmt, v_name):
method impl_PyImport_AppendInittab (line 2090) | def impl_PyImport_AppendInittab(self, stmt, v_name, v_initfunc):
method impl_PyImport_ImportModule (line 2100) | def impl_PyImport_ImportModule(self, stmt, v_name):
method impl_Py_Initialize (line 2111) | def impl_Py_Initialize(self, stmt):
method impl_Py_InitModule4_64 (line 2120) | def impl_Py_InitModule4_64(self, stmt, v_name, v_methods,
method impl_PyInt_AsLong (line 2141) | def impl_PyInt_AsLong(self, stmt, v_op):
method impl_PyInt_FromLong (line 2175) | def impl_PyInt_FromLong(self, stmt, v_ival):
method impl_PyIter_Next (line 2204) | def impl_PyIter_Next(self, stmt, v_iter):
method impl_PyList_Append (line 2246) | def impl_PyList_Append(self, stmt, v_op, v_newitem):
method impl_PyList_GetItem (line 2304) | def impl_PyList_GetItem(self, stmt, v_list, v_index):
method impl_PyList_New (line 2321) | def impl_PyList_New(self, stmt, v_len):
method impl_PyList_SetItem (line 2350) | def impl_PyList_SetItem(self, stmt, v_list, v_index, v_item):
method impl_PyList_Size (line 2392) | def impl_PyList_Size(self, stmt, v_list):
method impl_PyLong_FromLong (line 2415) | def impl_PyLong_FromLong(self, stmt, v_long):
method impl_PyLong_FromLongLong (line 2423) | def impl_PyLong_FromLongLong(self, stmt, v_v):
method impl_PyLong_FromString (line 2432) | def impl_PyLong_FromString(self, stmt, v_str, v_pend, v_base):
method impl_PyLong_FromVoidPtr (line 2443) | def impl_PyLong_FromVoidPtr(self, stmt, v_p):
method impl_PyMapping_Size (line 2455) | def impl_PyMapping_Size(self, stmt, v_o):
method impl_PyMem_Free (line 2477) | def impl_PyMem_Free(self, stmt, v_ptr):
method impl_PyMem_Malloc (line 2514) | def impl_PyMem_Malloc(self, stmt, v_size):
method impl_PyModule_AddIntConstant (line 2533) | def impl_PyModule_AddIntConstant(self, stmt, v_module, v_name, v_value):
method impl_PyModule_AddObject (line 2547) | def impl_PyModule_AddObject(self, stmt, v_module, v_name, v_value):
method impl_PyModule_AddStringConstant (line 2576) | def impl_PyModule_AddStringConstant(self, stmt, v_module, v_name, v_va...
method impl_PyModule_GetDict (line 2590) | def impl_PyModule_GetDict(self, stmt, v_module):
method impl_PyNumber_Int (line 2602) | def impl_PyNumber_Int(self, stmt, v_o):
method impl_PyNumber_Remainer (line 2611) | def impl_PyNumber_Remainer(self, stmt, v_v, v_w):
method _handle_PyObject_CallMethod (line 2624) | def _handle_PyObject_CallMethod(self, fncall, fmtargidx, with_size_t):
method impl_PyObject_AsFileDescriptor (line 2675) | def impl_PyObject_AsFileDescriptor(self, stmt, v_o):
method impl_PyObject_Call (line 2692) | def impl_PyObject_Call(self, stmt, v_o, v_args, v_kw):
method impl_PyObject_CallFunction (line 2704) | def impl_PyObject_CallFunction(self, stmt, v_callable, v_format, *args):
method impl__PyObject_CallFunction_SizeT (line 2716) | def impl__PyObject_CallFunction_SizeT(self, stmt, v_callable, v_format...
method _check_objargs (line 2727) | def _check_objargs(self, stmt, fnmeta, args, base_idx):
method impl_PyObject_CallFunctionObjArgs (line 2752) | def impl_PyObject_CallFunctionObjArgs(self, stmt, v_callable, *args):
method impl_PyObject_CallMethod (line 2766) | def impl_PyObject_CallMethod(self, stmt, v_o, v_name, v_format, *args):
method impl__PyObject_CallMethod_SizeT (line 2778) | def impl__PyObject_CallMethod_SizeT(self, stmt, v_o, v_name, v_format,...
method impl_PyObject_CallMethodObjArgs (line 2794) | def impl_PyObject_CallMethodObjArgs(self, stmt, v_o, v_name, *args):
method impl_PyObject_CallObject (line 2807) | def impl_PyObject_CallObject(self, stmt, v_o, v_args):
method impl_PyObject_GetAttr (line 2823) | def impl_PyObject_GetAttr(self, stmt, v_v, v_name):
method impl_PyObject_GetAttrString (line 2834) | def impl_PyObject_GetAttrString(self, stmt, v_v, v_name):
method impl_PyObject_GetItem (line 2847) | def impl_PyObject_GetItem(self, stmt, v_o, v_key):
method impl_PyObject_GenericGetAttr (line 2861) | def impl_PyObject_GenericGetAttr(self, stmt, v_o, v_name):
method impl_PyObject_GenericSetAttr (line 2884) | def impl_PyObject_GenericSetAttr(self, stmt, v_o, v_name, v_value):
method impl_PyObject_HasAttrString (line 2907) | def impl_PyObject_HasAttrString(self, stmt, v_o, v_attr_name):
method impl_PyObject_IsTrue (line 2931) | def impl_PyObject_IsTrue(self, stmt, v_o):
method impl__PyObject_New (line 2948) | def impl__PyObject_New(self, stmt, v_typeptr):
method impl_PyObject_Repr (line 2978) | def impl_PyObject_Repr(self, stmt, v_o):
method impl_PyObject_SetAttr (line 2988) | def impl_PyObject_SetAttr(self, stmt,
method impl_PyObject_SetAttrString (line 3011) | def impl_PyObject_SetAttrString(self, stmt,
method impl_PyObject_Str (line 3035) | def impl_PyObject_Str(self, stmt, v_o):
method impl_PyOS_snprintf (line 3050) | def impl_PyOS_snprintf(self, stmt, v_str, v_size, v_format, *v_args):
method impl_PyRun_SimpleFileExFlags (line 3063) | def impl_PyRun_SimpleFileExFlags(self, stmt, v_fp, v_filename,
method impl_PyRun_SimpleStringFlags (line 3079) | def impl_PyRun_SimpleStringFlags(self, stmt, v_command, v_flags):
method impl_PySequence_Concat (line 3095) | def impl_PySequence_Concat(self, stmt, v_o1, v_o2):
method impl_PySequence_DelItem (line 3112) | def impl_PySequence_DelItem(self, stmt, v_o, v_i):
method impl_PySequence_GetItem (line 3133) | def impl_PySequence_GetItem(self, stmt, v_o, v_i):
method impl_PySequence_GetSlice (line 3154) | def impl_PySequence_GetSlice(self, stmt, v_o, v_i1, v_i2):
method impl_PySequence_Length (line 3168) | def impl_PySequence_Length(self, stmt, v_o):
method impl_PySequence_SetItem (line 3171) | def impl_PySequence_SetItem(self, stmt, v_o, v_i, v_item):
method impl_PySequence_Size (line 3200) | def impl_PySequence_Size(self, stmt, v_o):
method impl_PyString_AsString (line 3226) | def impl_PyString_AsString(self, stmt, v_op):
method impl_PyString_Concat (line 3268) | def impl_PyString_Concat(self, stmt, v_pv, v_w):
method impl_PyString_ConcatAndDel (line 3332) | def impl_PyString_ConcatAndDel(self, stmt, v_pv, v_w):
method impl_PyString_FromFormat (line 3361) | def impl_PyString_FromFormat(self, stmt, v_fmt, *v_args):
method impl_PyString_FromString (line 3375) | def impl_PyString_FromString(self, stmt, v_str):
method impl_PyString_FromStringAndSize (line 3388) | def impl_PyString_FromStringAndSize(self, stmt, v_str, v_size):
method impl_PyString_InternFromString (line 3405) | def impl_PyString_InternFromString(self, stmt, v_v):
method impl_PyString_Size (line 3419) | def impl_PyString_Size(self, stmt, v_string):
method impl_PyStructSequence_InitType (line 3456) | def impl_PyStructSequence_InitType(self, stmt, v_type, v_desc):
method impl_PyStructSequence_New (line 3463) | def impl_PyStructSequence_New(self, stmt, v_typeptr):
method impl_PySys_GetObject (line 3491) | def impl_PySys_GetObject(self, stmt, v_name):
method impl_PySys_SetObject (line 3509) | def impl_PySys_SetObject(self, stmt, v_name, v_value):
method impl_PyTraceBack_Here (line 3534) | def impl_PyTraceBack_Here(self, stmt, v_frame):
method impl_PyTuple_GetItem (line 3548) | def impl_PyTuple_GetItem(self, stmt, v_op, v_i):
method impl_PyTuple_New (line 3561) | def impl_PyTuple_New(self, stmt, v_len):
method impl_PyTuple_Pack (line 3572) | def impl_PyTuple_Pack(self, stmt, v_n, *v_args):
method impl_PyTuple_SetItem (line 3598) | def impl_PyTuple_SetItem(self, stmt, v_op, v_i, v_newitem):
method impl_PyTuple_Size (line 3678) | def impl_PyTuple_Size(self, stmt, v_op):
method impl_PyType_IsSubtype (line 3718) | def impl_PyType_IsSubtype(self, stmt, v_a, v_b):
method impl_PyType_Ready (line 3726) | def impl_PyType_Ready(self, stmt, v_type):
method impl_PyUnicode_AsUTF8String (line 3741) | def impl_PyUnicode_AsUTF8String(self, stmt, v_unicode):
method impl_PyUnicodeUCS4_AsUTF8String (line 3752) | def impl_PyUnicodeUCS4_AsUTF8String(self, stmt, v_unicode):
method impl_PyUnicode_DecodeUTF8 (line 3755) | def impl_PyUnicode_DecodeUTF8(self, stmt, v_s, v_size, v_errors):
method impl_PyUnicodeUCS4_DecodeUTF8 (line 3768) | def impl_PyUnicodeUCS4_DecodeUTF8(self, stmt, v_s, v_size, v_errors):
method impl_PyWeakref_GetObject (line 3775) | def impl_PyWeakref_GetObject(self, stmt, v_op):
method impl_SWIG_Python_ErrorType (line 3799) | def impl_SWIG_Python_ErrorType(self, stmt, v_code):
method impl_SWIG_Python_SetErrorMsg (line 3814) | def impl_SWIG_Python_SetErrorMsg(self, stmt, v_errtype, v_msg):
function get_traces (line 3824) | def get_traces(fun):
function dump_traces_to_stdout (line 3830) | def dump_traces_to_stdout(traces):
class DebugAnnotator (line 3903) | class DebugAnnotator(Annotator):
method get_notes (line 3907) | def get_notes(self, transition):
class RefcountAnnotator (line 3946) | class RefcountAnnotator(Annotator):
method __init__ (line 3951) | def __init__(self, region, desc):
method get_notes (line 3957) | def get_notes(self, transition):
class ExceptionStateAnnotator (line 4001) | class ExceptionStateAnnotator(Annotator):
method get_notes (line 4006) | def get_notes(self, transition):
function function_is_tp_iternext_callback (line 4027) | def function_is_tp_iternext_callback(fun):
function emit_refcount_warning (line 4039) | def emit_refcount_warning(msg,
function check_refcount_for_one_object (line 4085) | def check_refcount_for_one_object(r_obj, v_ob_refcnt, v_return,
function warn_about_NULL_without_exception (line 4150) | def warn_about_NULL_without_exception(v_return,
function make_stmt_graph (line 4204) | def make_stmt_graph(fun):
function impl_check_refcounts (line 4208) | def impl_check_refcounts(fun, dump_traces=False,
function check_refcounts (line 4353) | def check_refcounts(fun, dump_traces=False, show_traces=False,
FILE: libcpychecker/types.py
function is_py3k (line 24) | def is_py3k():
function is_debug_build (line 33) | def is_debug_build():
function get_Py_ssize_t (line 40) | def get_Py_ssize_t():
function get_Py_buffer (line 43) | def get_Py_buffer():
function Py_UNICODE (line 46) | def Py_UNICODE():
function get_PY_LONG_LONG (line 49) | def get_PY_LONG_LONG():
function get_PyObject (line 56) | def get_PyObject():
function get_PyObjectPtr (line 59) | def get_PyObjectPtr():
function get_PyTypeObject (line 62) | def get_PyTypeObject():
function get_PyStringObject (line 65) | def get_PyStringObject():
function get_PyUnicodeObject (line 68) | def get_PyUnicodeObject():
function get_Py_complex (line 71) | def get_Py_complex():
function get_PyBytesObject (line 75) | def get_PyBytesObject():
function get_type_for_typeobject (line 103) | def get_type_for_typeobject(typeobject):
function register_type_object (line 111) | def register_type_object(typeobject, typedef):
FILE: libcpychecker/utils.py
function log (line 27) | def log(msg, *args):
FILE: libcpychecker/visualizations.py
class StatePrettyPrinter (line 21) | class StatePrettyPrinter(CfgPrettyPrinter):
method state_to_dot_label (line 25) | def state_to_dot_label(self, state):
class TracePrettyPrinter (line 35) | class TracePrettyPrinter(StatePrettyPrinter):
method __init__ (line 39) | def __init__(self, cfg, trace):
method extra_items (line 43) | def extra_items(self):
class StateGraphPrettyPrinter (line 61) | class StateGraphPrettyPrinter(StatePrettyPrinter):
method __init__ (line 66) | def __init__(self, sg):
method state_id (line 71) | def state_id(self, state):
method state_to_dot_label (line 74) | def state_to_dot_label(self, state, prevstate):
method extra_items (line 136) | def extra_items(self):
class HtmlRenderer (line 172) | class HtmlRenderer:
method __init__ (line 182) | def __init__(self, fun):
method make_header (line 195) | def make_header(self):
method make_report (line 292) | def make_report(self, report):
method make_html_for_trace (line 309) | def make_html_for_trace(self, report, trace):
method make_footer (line 423) | def make_footer(self):
FILE: libcpychecker_html/capi.py
function init (line 25) | def init():
function get_url (line 35) | def get_url(function):
FILE: libcpychecker_html/html_to_lxml.py
function main (line 20) | def main():
FILE: libcpychecker_html/make_html.py
function open (line 45) | def open(filename, mode='r'): # pylint:disable=redefined-builtin
class HtmlPage (line 54) | class HtmlPage(object):
method __init__ (line 56) | def __init__(self, codefile, data):
method __str__ (line 60) | def __str__(self):
method __html__ (line 64) | def __html__(self):
method head (line 67) | def head(self):
method raw_code (line 86) | def raw_code(self):
method code (line 92) | def code(self):
method header (line 117) | def header(self):
method footer (line 170) | def footer():
method states (line 188) | def states(self):
method body (line 234) | def body(self):
function data_uri (line 272) | def data_uri(mimetype, filename):
function file_contents (line 280) | def file_contents(filename):
class CodeHtmlFormatter (line 286) | class CodeHtmlFormatter(HtmlFormatter):
method wrap (line 289) | def wrap(self, source, outfile):
function main (line 304) | def main(argv):
FILE: libcpychecker_html/test/example1/bug.c
function PyObject (line 3) | PyObject *
FILE: libcpychecker_html/test/example2/_pylibmcmodule.h
type Py_ssize_t (line 48) | typedef ssize_t Py_ssize_t;
type memcached_return (line 71) | typedef memcached_return (*_PylibMC_SetCommand)(memcached_st *, const ch...
type memcached_return (line 73) | typedef memcached_return (*_PylibMC_IncrCommand)(memcached_st *,
type pylibmc_mset (line 76) | typedef struct {
type pylibmc_incr (line 94) | typedef struct {
type _PylibMC_StatsContext (line 102) | typedef struct {
type PylibMC_McErr (line 114) | typedef struct {
type PylibMC_Behavior (line 165) | typedef struct {
type PylibMC_Client (line 230) | typedef struct {
FILE: libcpychecker_html/test/example2/pylibmc-issue-68.c
function PyObject (line 53) | static PyObject *PylibMC_Client_get_multi(
FILE: libcpychecker_html/test/example3/_mysql.c
function PyMODINIT_FUNC (line 2978) | PyMODINIT_FUNC
FILE: maketreetypes.py
class TreeType (line 21) | class TreeType(namedtuple('TreeType', 'SYM, STRING, TYPE, NARGS')):
method camel_cased_string (line 22) | def camel_cased_string(self):
function iter_tree_types (line 27) | def iter_tree_types():
class GimpleType (line 44) | class GimpleType(namedtuple('GimpleType', 'gimple_symbol printable_name ...
method camel_cased_string (line 45) | def camel_cased_string(self):
function iter_gimple_types (line 48) | def iter_gimple_types():
class GimpleStructType (line 66) | class GimpleStructType(namedtuple('GimpleStructType', 'enum_value struct...
method camel_cased_string (line 67) | def camel_cased_string(self):
function iter_gimple_struct_types (line 70) | def iter_gimple_struct_types():
class DefRtlExpr (line 87) | class DefRtlExpr(namedtuple('DefRtlExpr', 'ENUM, NAME, FORMAT, CLASS')):
method camel_cased_string (line 88) | def camel_cased_string(self):
function iter_rtl_expr_types (line 91) | def iter_rtl_expr_types():
FILE: misc/fedora/bugreporting.py
class NewBug (line 24) | class NewBug:
method __init__ (line 25) | def __init__(self, product, version, component, summary, comment, bloc...
method make_url (line 34) | def make_url(self):
class Srpm (line 47) | class Srpm(namedtuple('Srpm',
method from_path (line 50) | def from_path(cls, path):
method __str__ (line 55) | def __str__(self):
class BugReport (line 58) | class BugReport(namedtuple('BugReport',
method get_status (line 60) | def get_status(self):
class Unreported (line 66) | class Unreported(namedtuple('Unreported',
method get_status (line 68) | def get_status(self):
class BugReportDb (line 71) | class BugReportDb:
method __init__ (line 72) | def __init__(self):
method find (line 104) | def find(self, srpmname):
method print_summary (line 111) | def print_summary(self):
method add_status (line 152) | def add_status(cls, srpm, notes):
function main (line 156) | def main():
FILE: misc/fedora/get-srpms.py
function get_srpms_for_installed_rpms (line 23) | def get_srpms_for_installed_rpms():
class ElementWrapper (line 34) | class ElementWrapper:
method __init__ (line 35) | def __init__(self, node):
method __str__ (line 40) | def __str__(self):
function mktag_ns (line 43) | def mktag_ns(raw):
function mktag_rpm (line 46) | def mktag_rpm(raw):
class RpmEntry (line 49) | class RpmEntry(ElementWrapper):
method get_name (line 50) | def get_name(self):
class Package (line 53) | class Package(ElementWrapper):
method get_name (line 54) | def get_name(self):
method get_location (line 57) | def get_location(self):
method get_format_node (line 60) | def get_format_node(self):
method get_requires (line 63) | def get_requires(self):
method has_requirement_by_name (line 72) | def has_requirement_by_name(self, pkgname):
method get_source_rpm (line 77) | def get_source_rpm(self):
class DocWrapper (line 81) | class DocWrapper:
method __init__ (line 82) | def __init__(self, doc):
class YumPrimary (line 85) | class YumPrimary(DocWrapper):
method from_file (line 87) | def from_file(cls, f):
method get_metadata (line 91) | def get_metadata(self):
method get_packages (line 94) | def get_packages(self):
function get_src_rpms (line 98) | def get_src_rpms():
FILE: misc/fedora/makeindex.py
class ErrorReport (line 29) | class ErrorReport(namedtuple('ErrorReport',
method href (line 31) | def href(self):
method contains_failure (line 34) | def contains_failure(self):
method is_within_initialization (line 49) | def is_within_initialization(self):
method might_be_borrowed_ref (line 69) | def might_be_borrowed_ref(self):
function get_errors_from_file (line 86) | def get_errors_from_file(htmlpath):
class Severity (line 126) | class Severity(namedtuple('Severity', ('priority', 'title', 'description...
class Triager (line 145) | class Triager:
method _classify_segfault (line 150) | def _classify_segfault(self, report):
method classify (line 160) | def classify(self, report):
class BuildLog (line 254) | class BuildLog:
method __init__ (line 256) | def __init__(self, path):
class Index (line 314) | class Index:
method __init__ (line 315) | def __init__(self, path, title):
method iter_severities (line 425) | def iter_severities(self):
function main (line 429) | def main():
FILE: misc/fedora/mass-rebuild.py
function nvr_from_srpm_path (line 31) | def nvr_from_srpm_path(path):
function get_local_python_srpms (line 37) | def get_local_python_srpms():
function get_result_dir (line 70) | def get_result_dir(srpmpath):
function local_rebuild_of_srpm_in_mock (line 75) | def local_rebuild_of_srpm_in_mock(srpmpath, mockcfg):
function prepare_bug_report (line 172) | def prepare_bug_report(srpmpath, index):
FILE: print-gcc-version.c
function main (line 26) | int main(int argc, const char *argv[])
FILE: run-test-suite.py
class CompilationError (line 65) | class CompilationError(CommandError):
method __init__ (line 66) | def __init__(self, out, err, p, args):
method _describe_activity (line 70) | def _describe_activity(self):
class TestStream (line 73) | class TestStream:
method __init__ (line 74) | def __init__(self, exppath, srcdir):
method _cleanup (line 103) | def _cleanup(self, text):
method check_for_diff (line 205) | def check_for_diff(self, out, err, p, args, label, writeback):
method diff (line 218) | def diff(self, label):
class UnexpectedOutput (line 229) | class UnexpectedOutput(CompilationError):
method __init__ (line 230) | def __init__(self, out, err, p, args, stream, label):
method _extra_info (line 235) | def _extra_info(self):
class DejaGnuError (line 238) | class DejaGnuError(Exception):
method __init__ (line 239) | def __init__(self, ctxt):
function get_source_files (line 242) | def get_source_files(testdir):
function parse_autogenerated_config_h (line 258) | def parse_autogenerated_config_h():
class SkipTest (line 276) | class SkipTest(Exception):
method __init__ (line 277) | def __init__(self, reason):
function run_test (line 280) | def run_test(testdir, srcdir):
function find_tests_below (line 447) | def find_tests_below(path):
function exclude_test (line 465) | def exclude_test(test):
function exclude_tests_below (line 471) | def exclude_tests_below(path):
function run_one_test (line 803) | def run_one_test(testdir):
class TestRunner (line 822) | class TestRunner:
method __init__ (line 823) | def __init__(self):
method run_tests (line 828) | def run_tests(self, testdirs):
method run_tests_in_parallel (line 832) | def run_tests_in_parallel(self, testdirs):
method handle_outcome (line 837) | def handle_outcome(self, outcome):
method print_results (line 847) | def print_results(self):
FILE: test.c
function helper_function (line 26) | int
function main (line 33) | int
FILE: test.py
function my_pass_execution_callback (line 36) | def my_pass_execution_callback(*args, **kwargs):
function my_pre_genericize_callback (line 85) | def my_pre_genericize_callback(*args, **kwargs):
FILE: testcpybuilder.py
function get_module_filename (line 32) | def get_module_filename(name):
class CompilationError (line 47) | class CompilationError(CommandError):
method __init__ (line 48) | def __init__(self, bm):
method _describe_activity (line 52) | def _describe_activity(self):
class BuiltModule (line 55) | class BuiltModule:
method __init__ (line 57) | def __init__(self, sm):
method write_src (line 60) | def write_src(self, modname, extra_cflags = None):
method compile_src (line 71) | def compile_src(self, extra_cflags = None):
method build (line 109) | def build(self, modname, extra_cflags = None):
method cleanup (line 113) | def cleanup(self):
class SimpleTest (line 116) | class SimpleTest(unittest.TestCase):
method setUp (line 120) | def setUp(self):
method tearDown (line 124) | def tearDown(self):
method test_simple_compilation (line 127) | def test_simple_compilation(self):
method test_module_with_type (line 165) | def test_module_with_type(self):
method test_version_parsing (line 208) | def test_version_parsing(self):
FILE: testcpychecker.py
function get_gcc_version (line 31) | def get_gcc_version():
class ExpectedErrorNotFound (line 39) | class ExpectedErrorNotFound(CompilationError):
method __init__ (line 40) | def __init__(self, expected_err, actual_err, bm):
method _describe_activity (line 46) | def _describe_activity(self):
class AnalyzerTests (line 63) | class AnalyzerTests(unittest.TestCase):
method compile_src (line 64) | def compile_src(self, bm):
method build_module (line 78) | def build_module(self, bm):
method assertNoErrors (line 82) | def assertNoErrors(self, src):
method assertFindsError (line 93) | def assertFindsError(self, src, experr):
class PyArg_ParseTupleTests (line 123) | class PyArg_ParseTupleTests(AnalyzerTests):
method test_bogus_format_string (line 124) | def test_bogus_format_string(self):
method test_finding_htons_error (line 137) | def test_finding_htons_error(self):
method test_not_enough_varargs (line 173) | def test_not_enough_varargs(self):
method test_too_many_varargs (line 191) | def test_too_many_varargs(self):
method test_correct_usage (line 212) | def test_correct_usage(self):
method get_function_name (line 226) | def get_function_name(self, header, code):
method make_src_for_correct_function (line 234) | def make_src_for_correct_function(self, code, typenames, params=None):
method make_src_for_incorrect_function (line 252) | def make_src_for_incorrect_function(self, code, typenames):
method get_funcname (line 266) | def get_funcname(self):
method get_argindex (line 269) | def get_argindex(self):
method get_linenum (line 272) | def get_linenum(self):
method get_colnum (line 275) | def get_colnum(self):
method get_expected_error (line 278) | def get_expected_error(self):
method _test_format_code (line 289) | def _test_format_code(self, code, typenames, exptypenames=None):
method test_format_code_s (line 321) | def test_format_code_s(self):
method test_format_code_s_star (line 328) | def test_format_code_s_star(self):
method test_format_code_z (line 331) | def test_format_code_z(self):
method test_format_code_z_star (line 338) | def test_format_code_z_star(self):
method test_format_code_u (line 341) | def test_format_code_u(self):
method test_format_code_es (line 348) | def test_format_code_es(self):
method test_format_code_et (line 355) | def test_format_code_et(self):
method test_format_code_b (line 367) | def test_format_code_b(self):
method test_format_code_B (line 370) | def test_format_code_B(self):
method test_format_code_h (line 373) | def test_format_code_h(self):
method test_format_code_H (line 377) | def test_format_code_H(self):
method test_format_code_i (line 381) | def test_format_code_i(self):
method test_format_code_I (line 384) | def test_format_code_I(self):
method test_format_code_l (line 387) | def test_format_code_l(self):
method test_format_code_k (line 391) | def test_format_code_k(self):
method test_format_code_L (line 395) | def test_format_code_L(self):
method test_format_code_K (line 399) | def test_format_code_K(self):
method test_format_code_n (line 403) | def test_format_code_n(self):
method test_format_code_c (line 406) | def test_format_code_c(self):
method test_format_code_f (line 409) | def test_format_code_f(self):
method test_format_code_d (line 412) | def test_format_code_d(self):
method test_format_code_D (line 415) | def test_format_code_D(self):
method test_format_code_O (line 418) | def test_format_code_O(self):
method test_format_code_w (line 437) | def test_format_code_w(self):
method test_format_code_w_star (line 444) | def test_format_code_w_star(self):
method test_mismatched_parentheses (line 447) | def test_mismatched_parentheses(self):
class PyArg_ParseTupleAndKeywordsTests (line 462) | class PyArg_ParseTupleAndKeywordsTests(PyArg_ParseTupleTests):
method get_funcname (line 463) | def get_funcname(self):
method get_argindex (line 466) | def get_argindex(self):
method get_linenum (line 469) | def get_linenum(self):
method get_colnum (line 472) | def get_colnum(self):
method make_src_for_correct_function (line 475) | def make_src_for_correct_function(self, code, typenames, params=None):
method make_src_for_incorrect_function (line 494) | def make_src_for_incorrect_function(self, code, typenames):
class Py_BuildValueTests (line 509) | class Py_BuildValueTests(AnalyzerTests):
method test_bogus_format_string (line 510) | def test_bogus_format_string(self):
method test_not_enough_varargs (line 520) | def test_not_enough_varargs(self):
method test_too_many_varargs (line 535) | def test_too_many_varargs(self):
method test_correct_usage (line 552) | def test_correct_usage(self):
FILE: tests/cpychecker/PyArg_Parse/incorrect_codes_S_and_U/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/code_O_bang/input.c
type UserDefinedObject (line 68) | typedef struct UserDefinedObject UserDefinedObject;
function PyObject (line 79) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/code_s/incorrect-constness/input.c
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/codes_accepting_null/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/correct_codes_S_and_U/input.c
function PyObject (line 34) | static PyObject *
function PyObject (line 56) | static PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/correct_converter/input.c
function PyObject (line 23) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/encodings/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/incorrect_code_z_hash/input.c
function PyObject (line 28) | static PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/incorrect_codes_S_and_U/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/incorrect_converters/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/keywords/input.c
function PyObject (line 26) | static PyObject *
FILE: tests/cpychecker/PyArg_ParseTuple/typedefs/input.c
type gdb_py_ulongest (line 29) | typedef unsigned PY_LONG_LONG gdb_py_ulongest;
function PyObject (line 31) | static PyObject *
FILE: tests/cpychecker/PyMethodDef/correct/input.c
type MySubclass (line 31) | typedef struct MySubclass {
function PyObject (line 36) | static PyObject *
function PyObject (line 42) | static PyObject *
function PyObject (line 48) | static PyObject *
FILE: tests/cpychecker/PyMethodDef/incorrect-types/input.c
type MySubclass (line 31) | typedef struct MySubclass {
function PyObject (line 36) | static PyObject *
function PyObject (line 42) | static PyObject *
function PyObject (line 48) | static PyObject *
FILE: tests/cpychecker/PyMethodDef/missing-sentinel/input.c
function PyObject (line 31) | static PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_O/subclass/input.c
type SomeObject (line 23) | struct SomeObject {
type SomeObject (line 29) | struct SomeObject
function PyObject (line 31) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_c/correct/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_f/correct/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_lower_d/correct/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_s_hash/correct/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_u/correct/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_u_hash/correct/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_upper_D/correct/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/Py_BuildValue/code_upper_D/incorrect/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/absinterp/arithmetic/correct/input.c
function test (line 28) | int
FILE: tests/cpychecker/absinterp/arithmetic/division-by-zero/definite/input.c
function test (line 27) | int
FILE: tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c
function test (line 27) | int
FILE: tests/cpychecker/absinterp/arithmetic/fix-trunc-expr/input.c
function test (line 26) | int
FILE: tests/cpychecker/absinterp/arithmetic/negative-shift/definite/input.c
function test (line 28) | int
FILE: tests/cpychecker/absinterp/arithmetic/negative-shift/possible/input.c
function test (line 28) | int
FILE: tests/cpychecker/absinterp/array-range/fully-checked-on-stack/input.c
function test (line 29) | int
FILE: tests/cpychecker/absinterp/array-range/fully-checked/input.c
function test (line 31) | int
FILE: tests/cpychecker/absinterp/array-range/implicitly-correct/input.c
function test (line 31) | int
FILE: tests/cpychecker/absinterp/array-range/off-by-one/input.c
function test (line 31) | int
FILE: tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c
function test (line 32) | void
FILE: tests/cpychecker/absinterp/array-range/unchecked/input.c
function test (line 31) | int
FILE: tests/cpychecker/absinterp/array-range/upper-checked/input.c
function test (line 29) | int
FILE: tests/cpychecker/absinterp/arrays/input.c
function test_arrays (line 25) | int test_arrays(void)
FILE: tests/cpychecker/absinterp/arrays2/input.c
function test_arrays2 (line 25) | int test_arrays2(void)
FILE: tests/cpychecker/absinterp/arrays3/input.c
type Foo (line 26) | typedef struct foo
FILE: tests/cpychecker/absinterp/arrays4/input.c
type Foo (line 26) | typedef struct foo
FILE: tests/cpychecker/absinterp/arrays5/input.c
function test_arrays5 (line 25) | int test_arrays5(void)
FILE: tests/cpychecker/absinterp/arrays6/input.c
function test_arrays6 (line 25) | int test_arrays6(void)
FILE: tests/cpychecker/absinterp/asm/empty/input.c
function test (line 26) | void
FILE: tests/cpychecker/absinterp/assignment-from-string-const/input.c
function test_string (line 22) | char test_string(const char *src)
FILE: tests/cpychecker/absinterp/bitfields/reading/input.c
type Foo (line 23) | struct Foo {
function test (line 31) | int test(struct Foo *foo)
FILE: tests/cpychecker/absinterp/casts/int-to-char-with-extraction/input.c
function test (line 30) | int
FILE: tests/cpychecker/absinterp/casts/int-to-char-with-implicit-truncation/input.c
function test (line 30) | int
FILE: tests/cpychecker/absinterp/casts/int-to-char-within-range/input.c
function test (line 30) | char
FILE: tests/cpychecker/absinterp/casts/int-to-float/input.c
function test (line 27) | float
FILE: tests/cpychecker/absinterp/casts/int-to-pointer/input.c
function test (line 28) | void
FILE: tests/cpychecker/absinterp/casts/int-to-pointer2/input.c
function test (line 30) | void
FILE: tests/cpychecker/absinterp/casts/pointer-to-long/input.c
function test (line 26) | long
FILE: tests/cpychecker/absinterp/casts/pyobjectptr-to-long/input.c
function test (line 26) | long
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c
function test (line 24) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-two-value-range/input.c
function test (line 22) | int
FILE: tests/cpychecker/absinterp/comparisons/boundaries/WithinRange-eq-ConcreteValue-in-middle/input.c
function test (line 22) | int
FILE: tests/cpychecker/absinterp/comparisons/conditionals/input.c
function test_conditionals (line 31) | int test_conditionals(void)
FILE: tests/cpychecker/absinterp/comparisons/expressions/input.c
function test_comparison_expressions (line 29) | int test_comparison_expressions(void)
FILE: tests/cpychecker/absinterp/comparisons/pointers/input.c
function test (line 27) | int
FILE: tests/cpychecker/absinterp/exceptions/input.c
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/absinterp/exit/input.c
function test_exit (line 25) | int test_exit(void)
FILE: tests/cpychecker/absinterp/function-pointers/input.c
function test (line 27) | int test(int i, int j)
FILE: tests/cpychecker/absinterp/nested-fields/input.c
type FooType (line 25) | struct FooType {
type BarType (line 29) | struct BarType {
type BazType (line 34) | struct BazType {
function test_nested (line 39) | int test_nested(void)
FILE: tests/cpychecker/absinterp/nested-fields2/input.c
type FooType (line 25) | struct FooType {
type BarType (line 29) | struct BarType {
function test_nested (line 33) | int test_nested(struct BarType bar)
FILE: tests/cpychecker/absinterp/nested-fields3/input.c
type FooType (line 25) | struct FooType {
type BarType (line 29) | struct BarType {
function test_nested (line 33) | int test_nested(void)
FILE: tests/cpychecker/absinterp/nonnull-attribute/input.c
type coord (line 25) | struct coord {
type coord (line 35) | struct coord
function test_function (line 37) | int test_function(struct coord *coord_ptr)
FILE: tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c
type coord (line 26) | struct coord {
type coord (line 31) | struct coord
function test_read_through_global_with_check (line 33) | int test_read_through_global_with_check(void)
FILE: tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c
type coord (line 26) | struct coord {
type coord (line 31) | struct coord
function test_read_through_global_without_check (line 33) | int test_read_through_global_without_check(void)
FILE: tests/cpychecker/absinterp/read-through-uninitialized-ptr/input.c
type coord (line 26) | struct coord {
function test_read_through_uninitialized_pointer (line 31) | int test_read_through_uninitialized_pointer(void)
FILE: tests/cpychecker/absinterp/real-cst/regular/input.c
function test (line 27) | double
FILE: tests/cpychecker/absinterp/result-decl/input.c
type foo (line 33) | struct foo {
function test (line 39) | struct foo
FILE: tests/cpychecker/absinterp/static-data/input.c
function test (line 23) | int test(void)
FILE: tests/cpychecker/absinterp/two-loops/input.c
function test (line 26) | void
FILE: tests/cpychecker/absinterp/uninitialized-data/input.c
function test_void (line 26) | int test_void(int i)
FILE: tests/cpychecker/absinterp/void-return/input.c
function test_void (line 25) | void test_void(void)
FILE: tests/cpychecker/absinterp/write-through-arg-unchecked/input.c
function test (line 26) | void
FILE: tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c
type coord (line 26) | struct coord {
type coord (line 31) | struct coord
function test_write_through_global_with_check (line 33) | void test_write_through_global_with_check(int x)
FILE: tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c
type coord (line 26) | struct coord {
type coord (line 31) | struct coord
function test_write_through_global_without_check (line 33) | void test_write_through_global_without_check(int x)
FILE: tests/cpychecker/fileptr-missing-error-check/input.c
function missing_error_check (line 22) | void
FILE: tests/cpychecker/refcounts/GIL/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c
type FooObject (line 27) | struct FooObject {
function PyObject (line 34) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c
function PyObject (line 23) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_UnpackTuple/missing-initialization/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyArg_UnpackTuple/wrong-number-of-varargs/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyCObject_FromVoidPtr/incorrect/input.c
type foo (line 27) | struct foo
type foo (line 33) | struct foo
function PyObject (line 35) | PyObject *
FILE: tests/cpychecker/refcounts/PyCObject_FromVoidPtrAndDesc/incorrect/input.c
type foo (line 27) | struct foo
type foo (line 33) | struct foo
function PyObject (line 35) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_New/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyDict_Size/simple/input.c
function Py_ssize_t (line 26) | Py_ssize_t
FILE: tests/cpychecker/refcounts/PyErr_Clear/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyErr_Format/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyErr_NewException/basic/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyErr_NoMemory/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyErr_PrintEx/input.c
function PyObject (line 26) | PyObject*
FILE: tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyErr_SetString/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyEval_CallMethod/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyEval_CallMethod/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c
function test (line 27) | double
FILE: tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/refcounts/PyFloat_FromDouble/simple/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyGILState_Ensure/correct/input.c
function test (line 26) | void
FILE: tests/cpychecker/refcounts/PyInt_AsLong/correct_PyIntObject/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/refcounts/PyInt_FromLong/correct_large_int/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyInt_FromLong/correct_small_int/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyIter_Next/simple/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_Append/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_Append/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c
function test (line 26) | int
FILE: tests/cpychecker/refcounts/PyList_Append/ticket-19/input.c
function test (line 29) | int
FILE: tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c
function PyObject (line 31) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_GetItem/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyList_Size/known-size/input.c
function test (line 26) | int
FILE: tests/cpychecker/refcounts/PyList_Size/unknown-size/input.c
function Py_ssize_t (line 26) | Py_ssize_t
FILE: tests/cpychecker/refcounts/PyMapping_Size/basic/input.c
function Py_ssize_t (line 26) | Py_ssize_t
FILE: tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyModule_AddObject/incorrect-with-cast/input.c
function test (line 28) | int
FILE: tests/cpychecker/refcounts/PyObject_CallFunction/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_CallFunctionObjArgs/correct/input.c
type FooObject (line 26) | struct FooObject {
function PyObject (line 31) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_CallFunctionObjArgs/incorrect/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_CallMethod/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c
type FooObject (line 26) | struct FooObject {
function PyObject (line 31) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c
type FooObject (line 27) | struct FooObject {
function PyObject (line 32) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_CallObject/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_GenericGetAttr/basic/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_GenericSetAttr/basic/input.c
function test (line 26) | int
FILE: tests/cpychecker/refcounts/PyObject_GetAttr/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_GetAttr/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_GetAttrString/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_GetAttrString/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_GetItem/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_GetItem/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_HasAttrString/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyObject_SetAttrString/ignored-lhs/input.c
function test (line 27) | void
FILE: tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PySequence_Size/correct/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PySequence_Size/null/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_AsString/correct/input.c
function PyObject (line 25) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c
function PyObject (line 25) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_AsString/unknown/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_Concat/basic/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_Concat/null-lhs/input.c
function test (line 26) | void
FILE: tests/cpychecker/refcounts/PyString_Concat/null-rhs/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_ConcatAndDel/basic/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_ConcatAndDel/null-lhs/input.c
function test (line 26) | void test(void)
FILE: tests/cpychecker/refcounts/PyString_ConcatAndDel/null-rhs/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_FromStringAndSize/correct/input.c
function PyObject (line 25) | PyObject *
FILE: tests/cpychecker/refcounts/PyString_Size/correct/input.c
function Py_ssize_t (line 26) | Py_ssize_t
FILE: tests/cpychecker/refcounts/PyStructSequence/correct/input.c
type PyStructSequence_Field (line 27) | struct PyStructSequence_Field
type PyStructSequence_Desc (line 33) | struct PyStructSequence_Desc
function PyObject (line 42) | PyObject *
FILE: tests/cpychecker/refcounts/PySys_GetObject/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PySys_SetObject/correct/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_New/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_Pack/incorrect-arg-count/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_Size/incorrect/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyTuple_Size/ticket-24/input.c
function Py_ssize_t (line 26) | Py_ssize_t
FILE: tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyUnicode_AsUTF8String/basic/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyWeakref_GetObject/NULL/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/Py_BuildValue/correct-code-s/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/Py_BuildValue/correct/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/Py_FatalError/correct/input.c
function test (line 26) | void
FILE: tests/cpychecker/refcounts/Py_Finalize/correct/input.c
function test (line 26) | void
FILE: tests/cpychecker/refcounts/SWIG_Python_ErrorType/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/SWIG_Python_SetErrorMsg/correct/input.c
function test (line 26) | void
FILE: tests/cpychecker/refcounts/_PyObject_New/correct/input.c
type FooObject (line 26) | struct FooObject {
function PyObject (line 35) | PyObject *
FILE: tests/cpychecker/refcounts/__builtin_expect/input.c
function test (line 53) | void
FILE: tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-marking/input.c
function PyObject (line 38) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c
function PyObject (line 38) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/returns-borrowed-ref/incorrect-marking/input.c
function PyObject (line 38) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/returns-borrowed-ref/incorrect-usage/input.c
function PyObject (line 38) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c
function test (line 38) | extern int test(int i)
FILE: tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c
function PyObject (line 38) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/incorrect-marking/input.c
function test (line 38) | extern int test(int i)
FILE: tests/cpychecker/refcounts/attributes/sets-exception/correct-marking/input.c
function test (line 38) | extern void test(const char *msg)
FILE: tests/cpychecker/refcounts/attributes/sets-exception/correct-usage/input.c
function PyObject (line 38) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/sets-exception/incorrect-marking/input.c
function test (line 38) | extern int test(void)
FILE: tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c
function PyObject (line 42) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c
function PyObject (line 38) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c
function PyObject (line 39) | PyObject *
FILE: tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-usage/input.c
function PyObject (line 39) | PyObject *
FILE: tests/cpychecker/refcounts/combinatorial-explosion-with-error/input.c
function PyObject (line 31) | PyObject *
FILE: tests/cpychecker/refcounts/combinatorial-explosion/input.c
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/refcounts/correct_decref/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/correct_object_ctor/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/correct_object_ctor/script.py
function verify_traces (line 22) | def verify_traces(optpass, fun):
FILE: tests/cpychecker/refcounts/correct_py_none/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/cplusplus/destructor/input.cc
class Foo (line 24) | class Foo
class Bar (line 30) | class Bar : public Foo
FILE: tests/cpychecker/refcounts/cplusplus/empty-function/input.cc
class Test (line 26) | class Test
method foo (line 29) | virtual void foo() {}
FILE: tests/cpychecker/refcounts/cplusplus/method/input.cc
class Foo (line 23) | class Foo
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/refcounts/cplusplus/reference/input.cc
function test (line 25) | void test(int &i)
FILE: tests/cpychecker/refcounts/cplusplus/simple/input.cc
function PyObject (line 24) | PyObject *
FILE: tests/cpychecker/refcounts/cplusplus/this/input.cc
class Foo (line 24) | class Foo
FILE: tests/cpychecker/refcounts/fold_conditional/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/function-that-exits/input.c
function test (line 27) | void
FILE: tests/cpychecker/refcounts/getter/input.c
type MySubclass (line 27) | struct MySubclass {
type foo (line 32) | struct foo
function PyObject (line 34) | static PyObject *
FILE: tests/cpychecker/refcounts/handle_null_error/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/incorrect_py_none/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/incorrect_py_none/script.py
function verify_traces (line 21) | def verify_traces(optpass, fun):
FILE: tests/cpychecker/refcounts/json/basic/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/json/basic/script.py
function verify_json (line 25) | def verify_json(optpass, fun):
FILE: tests/cpychecker/refcounts/loop_n_times/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c
function test (line 27) | void
FILE: tests/cpychecker/refcounts/missing_decref/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/module_handling/input.c
type PyModuleDef (line 31) | struct PyModuleDef
function PyMODINIT_FUNC (line 43) | static PyMODINIT_FUNC PyInit_example(void)
FILE: tests/cpychecker/refcounts/multiple-returns/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/not_setting_exception/input.c
function PyObject (line 25) | PyObject *
FILE: tests/cpychecker/refcounts/object_from_callback/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/object_leak/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/object_leak/script.py
function verify_traces (line 22) | def verify_traces(optpass, fun):
FILE: tests/cpychecker/refcounts/passing_dead_object/input.c
function passing_dead_object_to_function (line 28) | void
FILE: tests/cpychecker/refcounts/returning_dead_object/input.c
function PyObject (line 25) | PyObject *
FILE: tests/cpychecker/refcounts/storage_regions/static/correct/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/subclass/detection/input.c
type FooObject (line 27) | struct FooObject {
type BarObject (line 33) | struct BarObject {
type BazObject (line 39) | struct BazObject {
type NotAnObject (line 45) | struct NotAnObject {
FILE: tests/cpychecker/refcounts/subclass/detection/script.py
function get_struct (line 25) | def get_struct(tagname):
function check_type (line 34) | def check_type(t):
function check_typedef (line 38) | def check_typedef(typedef):
function check_struct (line 45) | def check_struct(typename):
function on_pass_execution (line 53) | def on_pass_execution(p, fn):
FILE: tests/cpychecker/refcounts/subclass/handling/input.c
type FooObject (line 27) | struct FooObject {
function PyObject (line 36) | PyObject *
FILE: tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c
type FooObject (line 29) | struct FooObject {
type BarObject (line 35) | struct BarObject {
function test_function (line 41) | void
FILE: tests/cpychecker/refcounts/subclass/opaque-struct/input.c
type SomeType (line 25) | typedef struct _sometype SomeType;
function test (line 27) | void
FILE: tests/cpychecker/refcounts/ticket-20/input.c
function test (line 29) | int
FILE: tests/cpychecker/refcounts/too_many_increfs/input.c
function PyObject (line 22) | PyObject *
FILE: tests/cpychecker/refcounts/tp_iternext/correct/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/tp_iternext/partial-type-object/input.c
function PyObject (line 29) | PyObject *
FILE: tests/cpychecker/refcounts/uninitialized_data/comparison/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c
function PyObject (line 27) | PyObject *
FILE: tests/cpychecker/refcounts/unrecognized_function/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/unrecognized_function2/input.c
function PyObject (line 28) | PyObject *
FILE: tests/cpychecker/refcounts/unrecognized_function3/input.c
function call_to_unrecognized_function (line 28) | void
FILE: tests/cpychecker/refcounts/unrecognized_function4/input.c
type FooObject (line 26) | typedef struct FooObject {
function PyObject (line 33) | PyObject *
FILE: tests/cpychecker/refcounts/use_after_dealloc/input.c
function PyObject (line 26) | PyObject *
FILE: tests/cpychecker/refcounts/without-python-headers/input.c
function test (line 25) | int
FILE: tests/cpychecker/unknown-function/input.c
function foo (line 22) | int foo(int i)
FILE: tests/examples/attributes-with-macros/script.py
function attribute_callback_for_claims_mutex (line 20) | def attribute_callback_for_claims_mutex(*args):
function attribute_callback_for_releases_mutex (line 23) | def attribute_callback_for_releases_mutex(*args):
function register_our_attributes (line 26) | def register_our_attributes():
FILE: tests/examples/attributes/script.py
function attribute_callback_for_claims_mutex (line 22) | def attribute_callback_for_claims_mutex(*args):
function attribute_callback_for_releases_mutex (line 25) | def attribute_callback_for_releases_mutex(*args):
function register_our_attributes (line 28) | def register_our_attributes():
FILE: tests/examples/c/struct/input.c
type test_struct (line 21) | struct test_struct {
function foo (line 27) | void foo()
FILE: tests/examples/c/struct/script.py
class TestPass (line 23) | class TestPass(gcc.GimplePass):
method execute (line 24) | def execute(self, fn):
FILE: tests/examples/cplusplus/classes/input.cc
type Example (line 21) | namespace Example {
type Coord (line 22) | struct Coord {
class Widget (line 27) | class Widget {
method Widget (line 29) | Widget() {
type Coord (line 39) | struct Coord
type Coord (line 42) | struct Coord
class Dialog (line 45) | class Dialog : public Widget {
method Dialog (line 47) | Dialog(): Widget() {
method get_width (line 52) | int get_width() { return 400; }
type Coord (line 57) | struct Coord
function foo (line 63) | void foo()
function foo (line 67) | void foo(const char *str)
function foo (line 71) | void foo(const Example::Coord& coord)
FILE: tests/examples/cplusplus/classes/script.py
class TestPass (line 21) | class TestPass(gcc.GimplePass):
method execute (line 22) | def execute(self, fn):
FILE: tests/examples/cplusplus/methods/input.cc
class test (line 20) | class test {
FILE: tests/examples/cplusplus/methods/script.py
function gccPassHook (line 22) | def gccPassHook(passname, _):
FILE: tests/examples/find-global-state/input.c
function test (line 30) | int test(int j)
function test2 (line 38) | int test2(int p)
function test3 (line 45) | int test3(int k)
function test4 (line 51) | int test4()
function test6 (line 56) | int test6()
type banana (line 61) | struct banana {
type banana (line 65) | struct banana
function test7 (line 67) | int test7()
FILE: tests/examples/find-global-state/script.py
function is_const (line 23) | def is_const(type_):
class StateFinder (line 39) | class StateFinder:
method __init__ (line 40) | def __init__(self):
method find_state_users (line 61) | def find_state_users(self, node, loc):
method flush (line 70) | def flush(self):
function on_pass_execution (line 78) | def on_pass_execution(p, fn):
FILE: tests/examples/hello-world/input.c
function main (line 22) | int main(int argc, char *argv[])
FILE: tests/examples/hello-world/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, fn):
FILE: tests/examples/lto/input-g.c
function g (line 25) | void g(int b, void *q)
FILE: tests/examples/lto/input-main.c
function main (line 25) | int main(int argc, char **argv)
FILE: tests/examples/lto/script.py
class ShowSupergraph (line 28) | class ShowSupergraph(gcc.IpaPass):
method execute (line 29) | def execute(self):
FILE: tests/examples/spelling-checker/input.c
function main (line 22) | int main(int argc, char *argv[])
FILE: tests/examples/spelling-checker/script.py
class SpellcheckingPass (line 25) | class SpellcheckingPass(gcc.GimplePass):
method execute (line 26) | def execute(self, fun):
method spellcheck_node (line 33) | def spellcheck_node(self, node, loc):
FILE: tests/gccutils/graph/script.py
class NamedNode (line 32) | class NamedNode(Node):
method __init__ (line 33) | def __init__(self, name=None):
method __str__ (line 37) | def __str__(self):
method __repr__ (line 42) | def __repr__(self):
function make_trivial_graph (line 45) | def make_trivial_graph():
function add_long_path (line 56) | def add_long_path(g, length):
function add_cycle (line 71) | def add_cycle(g, length):
class GraphTests (line 84) | class GraphTests(unittest.TestCase):
method test_to_dot (line 85) | def test_to_dot(self):
method test_long_path (line 89) | def test_long_path(self):
method test_cycle (line 97) | def test_cycle(self):
class PathfindingTests (line 105) | class PathfindingTests(unittest.TestCase):
method test_no_path (line 106) | def test_no_path(self):
method test_trivial_path (line 114) | def test_trivial_path(self):
method test_long_path (line 119) | def test_long_path(self):
method test_cycles (line 128) | def test_cycles(self):
method test_fork (line 142) | def test_fork(self):
FILE: tests/gccutils/topological-sort/input.c
function a (line 35) | int a(int i)
function b (line 40) | int b(int i)
function c (line 45) | int c(int i)
function d (line 50) | int d(int i)
function e (line 56) | int e(int i)
function f (line 66) | int f(int i)
function g (line 71) | int g(int i)
function h (line 77) | int h(int i)
function j (line 82) | int j(int i)
FILE: tests/gccutils/topological-sort/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, fn):
FILE: tests/plugin/array-type/input.c
function function (line 26) | int function(void)
FILE: tests/plugin/array-type/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, fn):
FILE: tests/plugin/arrays/input.c
function test_arrays (line 21) | int test_arrays(void)
FILE: tests/plugin/arrays/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, fn):
FILE: tests/plugin/attributes/input.c
function main (line 30) | __attribute__((custom_attribute_without_args,
FILE: tests/plugin/attributes/script.py
function my_attribute_callback_A (line 22) | def my_attribute_callback_A(*args):
function my_attribute_callback_B (line 25) | def my_attribute_callback_B(*args):
function my_attribute_callback_C (line 28) | def my_attribute_callback_C(*args):
function register_our_attributes (line 31) | def register_our_attributes():
FILE: tests/plugin/callback-FINISH_DECL/input.c
type test_struct (line 24) | struct test_struct {
type test_typedef (line 28) | typedef struct test_struct test_typedef;
function test_fn (line 30) | int test_fn(int i)
FILE: tests/plugin/callback-FINISH_DECL/script.py
function finish_decl_cb (line 22) | def finish_decl_cb(*args, **kwargs):
FILE: tests/plugin/callbacks/PLUGIN_FINISH/script.py
function my_callback (line 21) | def my_callback(*args, **kwargs):
FILE: tests/plugin/callbacks/args/script.py
function my_callback (line 22) | def my_callback(*args, **kwargs):
FILE: tests/plugin/callbacks/exception/script.py
function my_callback (line 21) | def my_callback(*args, **kwargs):
FILE: tests/plugin/callbacks/refs/script.py
class Whatever (line 6) | class Whatever:
method doit (line 7) | def doit(self, optpass, fun, *args, **kwargs):
function main (line 10) | def main(**kwargs):
FILE: tests/plugin/callgraph/input.c
function foo (line 20) | void foo()
function bar (line 24) | void bar(void)
function baz (line 31) | void baz(void)
FILE: tests/plugin/callgraph/script.py
function on_pass_execution (line 28) | def on_pass_execution(p, fn):
FILE: tests/plugin/compound-locations/input.c
function test (line 23) | int test (int foo, int bar)
FILE: tests/plugin/compound-locations/script.py
function on_pass_execution (line 24) | def on_pass_execution(p, fn):
FILE: tests/plugin/constants/script.py
function on_finish_unit (line 23) | def on_finish_unit():
FILE: tests/plugin/diagnostics/input.c
function main (line 22) | int main(int argc, char *argv[])
FILE: tests/plugin/diagnostics/script.py
function on_pass_execution (line 24) | def on_pass_execution(p, fn):
FILE: tests/plugin/dumpfiles/input.c
function foo (line 20) | int foo(const char *str)
function bar (line 29) | int bar(const char *str)
FILE: tests/plugin/dumpfiles/script.py
class TestPass (line 26) | class TestPass(gcc.GimplePass):
method execute (line 27) | def execute(self, fun):
class VerifyPass (line 52) | class VerifyPass(gcc.GimplePass):
method execute (line 53) | def execute(self, fun):
FILE: tests/plugin/enum-type/input.c
type the_enum (line 19) | enum the_enum
type the_enum (line 28) | enum the_enum
FILE: tests/plugin/enum-type/script.py
function on_decl (line 20) | def on_decl(v, *args, **kwargs):
FILE: tests/plugin/function-types/script.py
function check_fn_type (line 21) | def check_fn_type(name):
function on_finish_unit (line 42) | def on_finish_unit():
FILE: tests/plugin/functions/input.c
function foo (line 22) | void foo(int a, int b)
FILE: tests/plugin/functions/script.py
function on_pass_execution (line 23) | def on_pass_execution(p, fn):
FILE: tests/plugin/gc/_force_garbage_collection/script.py
function on_ggc_start (line 25) | def on_ggc_start():
function on_finish (line 32) | def on_finish():
FILE: tests/plugin/gc/_gc_selftest/input.c
function helper_function (line 26) | int
function main (line 33) | int
FILE: tests/plugin/gc/_gc_selftest/script.py
function on_finish (line 21) | def on_finish():
FILE: tests/plugin/gc/segfault-on-instance-of-pass-subclass/script.py
class UnusedArg (line 3) | class UnusedArg(gcc.GimplePass):
method execute (line 4) | def execute(self, fun):
FILE: tests/plugin/gimple-asm/input.c
function helper_function (line 20) | void
FILE: tests/plugin/gimple-asm/script.py
function on_pass_execution (line 23) | def on_pass_execution(p, fn):
FILE: tests/plugin/gimple-cond/explicit-comparison/input.c
function helper_function (line 24) | int
FILE: tests/plugin/gimple-cond/explicit-comparison/script.py
function on_pass_execution (line 23) | def on_pass_execution(p, fn):
FILE: tests/plugin/gimple-cond/implicit-comparison/input.c
function helper_function (line 24) | int
FILE: tests/plugin/gimple-cond/implicit-comparison/script.py
function on_pass_execution (line 23) | def on_pass_execution(p, fn):
FILE: tests/plugin/gimple-walk-tree/dump-all/input.c
function helper_function (line 26) | int
function main (line 33) | int
FILE: tests/plugin/gimple-walk-tree/dump-all/script.py
class DumpTreeNodesPass (line 22) | class DumpTreeNodesPass(gcc.GimplePass):
method execute (line 23) | def execute(self, fun):
method dump_node (line 32) | def dump_node(self, node, loc):
FILE: tests/plugin/gimple-walk-tree/exceptions/input.c
function helper_function (line 26) | int
function main (line 33) | int
FILE: tests/plugin/gimple-walk-tree/exceptions/script.py
class WalkTreeNodesPass (line 22) | class WalkTreeNodesPass(gcc.GimplePass):
method execute (line 23) | def execute(self, fun):
method dump_node (line 32) | def dump_node(self, node, loc):
FILE: tests/plugin/gimple-walk-tree/find-one/input.c
function helper_function (line 26) | int
function main (line 33) | int
FILE: tests/plugin/gimple-walk-tree/find-one/script.py
class FindTreeNodesPass (line 22) | class FindTreeNodesPass(gcc.GimplePass):
method execute (line 23) | def execute(self, fun):
method find_node (line 34) | def find_node(self, node):
FILE: tests/plugin/identifiers/input.c
type foo (line 20) | struct foo {
FILE: tests/plugin/identifiers/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, data):
FILE: tests/plugin/initializers/input.c
type foo (line 20) | struct foo {
type foo (line 25) | struct foo
type foo (line 31) | struct foo
type foo (line 33) | struct foo
FILE: tests/plugin/initializers/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, data):
FILE: tests/plugin/language-specific-errors/fullname/input.c
function foo (line 20) | void foo(int x, int y)
FILE: tests/plugin/language-specific-errors/fullname/script.py
class TestPass (line 24) | class TestPass(gcc.GimplePass):
method execute (line 25) | def execute(self, fn):
FILE: tests/plugin/macros/correct/input.c
function main (line 37) | int main(int argc, char *argv[])
FILE: tests/plugin/macros/correct/script.py
function register_our_macros (line 22) | def register_our_macros():
FILE: tests/plugin/macros/too-early/input.c
function main (line 37) | int main(int argc, char *argv[])
FILE: tests/plugin/namespace/input.cc
type top (line 1) | namespace top {
type sub (line 7) | namespace sub {
type sub_sub (line 11) | namespace sub_sub {
type foo (line 17) | namespace foo {
type bar (line 18) | namespace bar {
FILE: tests/plugin/namespace/script.py
function indent_print (line 21) | def indent_print(depth, thing):
function print_namespace (line 24) | def print_namespace(ns, depth):
function dump_namespaces (line 46) | def dump_namespaces(ns, depth):
function finish_unit_cb (line 64) | def finish_unit_cb(*args, **kwargs):
FILE: tests/plugin/new-passes/input.c
function foo (line 20) | int foo(const char *str)
function bar (line 29) | int bar(const char *str)
FILE: tests/plugin/new-passes/script.py
class GimplePassWithoutGate (line 27) | class GimplePassWithoutGate(gcc.GimplePass):
method execute (line 28) | def execute(*args):
class GimplePassWithFalseGate (line 35) | class GimplePassWithFalseGate(gcc.GimplePass):
method gate (line 36) | def gate(*args):
method execute (line 40) | def execute(*args):
class GimplePassWithTrueGate (line 49) | class GimplePassWithTrueGate(gcc.GimplePass):
method gate (line 50) | def gate(*args):
method execute (line 54) | def execute(*args):
class GimplePassWithErrorInGate (line 62) | class GimplePassWithErrorInGate(gcc.GimplePass):
method gate (line 63) | def gate(*args):
method execute (line 67) | def execute(*args):
class GimplePassWithErrorInExecute (line 76) | class GimplePassWithErrorInExecute(gcc.GimplePass):
method execute (line 77) | def execute(*args):
class GimplePassWithBadReturnFromExecute (line 86) | class GimplePassWithBadReturnFromExecute(gcc.GimplePass):
method execute (line 87) | def execute(*args):
class MyRtlPass (line 97) | class MyRtlPass(gcc.RtlPass):
method execute (line 98) | def execute(*args):
class MySimpleIpaPass (line 106) | class MySimpleIpaPass(gcc.SimpleIpaPass):
method execute (line 107) | def execute(*args):
class MyIpaPass (line 115) | class MyIpaPass(gcc.IpaPass):
method execute (line 116) | def execute(*args):
class GimplePassSettingLocation (line 124) | class GimplePassSettingLocation(gcc.GimplePass):
method execute (line 125) | def execute(*args):
class TestBogusKwargs (line 136) | class TestBogusKwargs(gcc.GimplePass):
method __init__ (line 137) | def __init__(self):
FILE: tests/plugin/options/script.py
function print_option (line 24) | def print_option(option):
FILE: tests/plugin/parameters/script.py
function print_param_named (line 25) | def print_param_named(name):
FILE: tests/plugin/rich-location/input.c
function test_1 (line 22) | void test_1 (void)
FILE: tests/plugin/rich-location/script.py
function on_pass_execution (line 24) | def on_pass_execution(p, fn):
FILE: tests/plugin/rtl/input.c
function main (line 22) | int main(int argc, char *argv[])
FILE: tests/plugin/rtl/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, fn):
FILE: tests/plugin/switch/input.c
function test_switch (line 23) | int test_switch(int i)
FILE: tests/plugin/switch/script.py
function on_pass_execution (line 22) | def on_pass_execution(p, fn):
FILE: tests/plugin/translation-units/input.c
type test_typedef (line 20) | typedef int test_typedef;
FILE: tests/plugin/translation-units/script.py
function on_pass_execution (line 23) | def on_pass_execution(p, data):
FILE: tests/plugin/type-attributes/script.py
function on_finish_unit (line 21) | def on_finish_unit():
FILE: tests/plugin/types/input.c
type mytype (line 20) | typedef int mytype;
type mytype (line 21) | typedef mytype nestedtype;
FILE: tests/plugin/types/script.py
function on_finish_unit (line 23) | def on_finish_unit():
FILE: tests/plugin/version/script.py
function test_version (line 21) | def test_version(name, v):
FILE: wrapperbuilder.py
function indent (line 23) | def indent(lines):
class PyGccWrapperTypeObject (line 26) | class PyGccWrapperTypeObject(PyTypeObject):
method __init__ (line 31) | def __init__(self, *args, **kwargs):
method c_defn (line 35) | def c_defn(self):
Condensed preview — 1385 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,009K chars).
[
{
"path": ".gitignore",
"chars": 796,
"preview": "*~\n.*.sw[a-z]\n*.o\n*.so\na.out\n*.pyc\ntest.png\n\n# Generated during configuration:\nconfig-tests\n\n# Generated elsewhere in bu"
},
{
"path": ".travis.yml",
"chars": 1944,
"preview": "matrix:\n include:\n - os: linux\n addons:\n apt:\n sources:\n - ubuntu-toolchain-r-test\n "
},
{
"path": "COPYING",
"chars": 35147,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "LICENSES.txt",
"chars": 1018,
"preview": "The C and Python code is licensed under the GPLv3 or later (see COPYING and the\nper-file license information).\n\nThere ar"
},
{
"path": "Makefile",
"chars": 14991,
"preview": "# Copyright 2011-2013, 2017 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011-2013, 2017 Red Hat, Inc.\n#\n# This"
},
{
"path": "README.rst",
"chars": 4164,
"preview": "gcc-python\n==========\n\nThis is a plugin for GCC, which links against libpython, and (I hope) allows\nyou to invoke arbitr"
},
{
"path": "configbuilder.py",
"chars": 6364,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "contributors.rst",
"chars": 55,
"preview": "Alexandre Lissy\nDavid Malcolm\nDavid Narvaez\nTom Tromey\n"
},
{
"path": "cpybuilder.py",
"chars": 19787,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "cpychecker.py",
"chars": 779,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "dejagnu.py",
"chars": 15121,
"preview": "# Copyright 2017 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2017 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "demo.c",
"chars": 2519,
"preview": "/*\n Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "demo.expected",
"chars": 1024,
"preview": "demo.c: In function ‘socket_htons’:\ndemo.c:36:: warning: Mismatching type in call to PyArg_ParseTuple with format code \""
},
{
"path": "demo.expected.no-refcounts",
"chars": 935,
"preview": "demo.c: In function ‘socket_htons’:\ndemo.c:36:: warning: Mismatching type in call to PyArg_ParseTuple with format code \""
},
{
"path": "docs/0.10.rst",
"chars": 6325,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.11.rst",
"chars": 2796,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.12.rst",
"chars": 4187,
"preview": ".. Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2013 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.13.rst",
"chars": 4092,
"preview": ".. Copyright 2014 David Malcolm <dmalcolm@redhat.com>\n Copyright 2014 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.14.rst",
"chars": 836,
"preview": ".. Copyright 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2015 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.15.rst",
"chars": 1246,
"preview": ".. Copyright 2016 David Malcolm <dmalcolm@redhat.com>\n Copyright 2016 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.16.rst",
"chars": 1314,
"preview": ".. Copyright 2018 David Malcolm <dmalcolm@redhat.com>\n Copyright 2018 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.17.rst",
"chars": 1231,
"preview": ".. Copyright 2019 David Malcolm <dmalcolm@redhat.com>\n Copyright 2019 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.7.rst",
"chars": 11465,
"preview": "0.7\n~~~\n\nThis is a major update to the GCC Python plugin.\n\nThe main example script, cpychecker, has seen numerous improv"
},
{
"path": "docs/0.8.rst",
"chars": 8702,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/0.9.rst",
"chars": 6011,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/Makefile",
"chars": 5008,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHINXBUILD "
},
{
"path": "docs/appendices.rst",
"chars": 896,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/attributes.rst",
"chars": 4689,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/basics.rst",
"chars": 12350,
"preview": ".. Copyright 2011-2012, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2012, 2017 Red Hat, Inc.\n\n This is "
},
{
"path": "docs/callbacks.rst",
"chars": 10676,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/callgraph.rst",
"chars": 2239,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/cfg.rst",
"chars": 5185,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/conf.py",
"chars": 8222,
"preview": "# Copyright 2011, 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is "
},
{
"path": "docs/cpychecker.rst",
"chars": 37402,
"preview": ".. Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012 Red Hat, Inc.\n\n This is free softw"
},
{
"path": "docs/diagnostics.rst",
"chars": 4438,
"preview": ".. Copyright 2011-2012, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2012, 2017 Red Hat, Inc.\n\n This is "
},
{
"path": "docs/examples.rst",
"chars": 4461,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/gcc-overview.rst",
"chars": 7002,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/gcc-with-python.rst",
"chars": 250,
"preview": "Usage::\n\n gcc-with-python PATH_TO_PYTHON_SCRIPT GCC PARAMETERS\n\n`gcc-with-python` is a helper script which invokes GCC"
},
{
"path": "docs/getting-involved.rst",
"chars": 17958,
"preview": ".. Copyright 2012, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2017 Red Hat, Inc.\n\n This is free softw"
},
{
"path": "docs/gimple.rst",
"chars": 13828,
"preview": ".. Copyright 2011, 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012, 2013 Red Hat, Inc.\n\n This i"
},
{
"path": "docs/index.rst",
"chars": 2952,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/locations.rst",
"chars": 3507,
"preview": ".. Copyright 2011-2012, 2017-2018 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2012, 2017-2018 Red Hat, Inc.\n\n "
},
{
"path": "docs/lto.rst",
"chars": 3365,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/misc.rst",
"chars": 1048,
"preview": ".. Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012 Red Hat, Inc.\n\n This is free softw"
},
{
"path": "docs/operators.rst",
"chars": 1202,
"preview": ".. Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/options.rst",
"chars": 2033,
"preview": "Inspecting GCC's command-line options\n=====================================\n\nGCC's command-line options are visible from"
},
{
"path": "docs/parameters.rst",
"chars": 1193,
"preview": "Working with GCC's tunable parameters\n=====================================\n\nGCC has numerous tunable parameters, which "
},
{
"path": "docs/passes.rst",
"chars": 13245,
"preview": ".. Copyright 2011, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2013 Red Hat, Inc.\n\n This is free softw"
},
{
"path": "docs/preprocessor.rst",
"chars": 1080,
"preview": "Working with the preprocessor\n=============================\n\nFor languages that support a preprocessor, it's possible to"
},
{
"path": "docs/release-notes.rst",
"chars": 910,
"preview": ".. Copyright 2011-2018 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2018 Red Hat, Inc.\n\n This is free softwar"
},
{
"path": "docs/rtl.rst",
"chars": 6319,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/success.rst",
"chars": 4443,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "docs/tables-of-passes.rst",
"chars": 11701,
"preview": ".. This file is autogenerated, using:\n ./gcc-with-python generate-tables-of-passes-rst.py test.c\n\nAll of GCC's passes\n"
},
{
"path": "docs/tree.rst",
"chars": 48420,
"preview": ".. Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012 Red Hat, Inc.\n\n This is free softw"
},
{
"path": "docs/versions.rst",
"chars": 3082,
"preview": ".. Copyright 2011, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2013 Red Hat, Inc.\n\n This is free softw"
},
{
"path": "docs/working-with-c.rst",
"chars": 2841,
"preview": ".. Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you can"
},
{
"path": "examples/show-callgraph.py",
"chars": 1846,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "examples/show-docs.py",
"chars": 762,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "examples/show-gimple.py",
"chars": 1420,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "examples/show-lto-supergraph.py",
"chars": 1457,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "examples/show-passes.py",
"chars": 1036,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "examples/show-ssa.py",
"chars": 1416,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gcc-c-api/Makefile",
"chars": 3217,
"preview": "# Copyright 2011, 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012, 2013 Red Hat, Inc.\n#\n# Th"
},
{
"path": "gcc-c-api/api.rng",
"chars": 3623,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nCopyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>\nCopyright 2012, 201"
},
{
"path": "gcc-c-api/callgraph.xml",
"chars": 1931,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/cfg.xml",
"chars": 2031,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 201"
},
{
"path": "gcc-c-api/constant.xml",
"chars": 1387,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/declaration.xml",
"chars": 2229,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/design.rst",
"chars": 2939,
"preview": "Proposed GCC plugin C API\n-------------------------\n\nThis is an API for GCC plugins written in C.\n\nAll public functions "
},
{
"path": "gcc-c-api/diagnostics.xml",
"chars": 1504,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2013 Red "
},
{
"path": "gcc-c-api/function.xml",
"chars": 1287,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/gcc-callgraph.c",
"chars": 4770,
"preview": "/*\n Copyright 2012, 2013, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2013, 2015 Red Hat, Inc.\n\n Thi"
},
{
"path": "gcc-c-api/gcc-cfg.c",
"chars": 7827,
"preview": "/*\n Copyright 2012, 2013, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2013, 2015 Red Hat, Inc.\n\n Thi"
},
{
"path": "gcc-c-api/gcc-common.h",
"chars": 1776,
"preview": "/*\n Copyright 2012, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2015 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-c-api/gcc-constant.c",
"chars": 1262,
"preview": "/*\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-declaration.c",
"chars": 8210,
"preview": "/*\n Copyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2013 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-c-api/gcc-diagnostics.c",
"chars": 1454,
"preview": "/*\n Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2013 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-function.c",
"chars": 2327,
"preview": "/*\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-gimple.c",
"chars": 8803,
"preview": "/*\n Copyright 2012, 2013, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2013, 2015 Red Hat, Inc.\n\n Thi"
},
{
"path": "gcc-c-api/gcc-internal.h",
"chars": 1071,
"preview": "/*\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-location.c",
"chars": 3346,
"preview": "/*\n Copyright 2012, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2017 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-c-api/gcc-option.c",
"chars": 1636,
"preview": "/*\n Copyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2013 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-c-api/gcc-private-compat.h",
"chars": 1930,
"preview": "/*\n Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2013 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-rtl.c",
"chars": 1204,
"preview": "/*\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-tree.c",
"chars": 7701,
"preview": "/*\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-type.c",
"chars": 9247,
"preview": "/*\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-c-api/gcc-variable.c",
"chars": 2693,
"preview": "/*\n Copyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012, 2013 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-c-api/generate-casts-c.py",
"chars": 3092,
"preview": "# Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2013 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gcc-c-api/gimple.xml",
"chars": 3799,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 201"
},
{
"path": "gcc-c-api/location.xml",
"chars": 1619,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 201"
},
{
"path": "gcc-c-api/option.xml",
"chars": 1106,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/rtl.xml",
"chars": 914,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/tree.xml",
"chars": 8975,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/type.xml",
"chars": 3724,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/variable.xml",
"chars": 1126,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red "
},
{
"path": "gcc-c-api/xml-to-h.py",
"chars": 11075,
"preview": "import glob\nimport sys\nfrom xmltypes import ApiRegistry, Api\n\nCOPYRIGHT_HEADER = '''\n Copyright 2013 David Malcolm <dm"
},
{
"path": "gcc-c-api/xmltypes.py",
"chars": 8548,
"preview": "# Copyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012, 2013 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "gcc-python-attribute.c",
"chars": 7647,
"preview": "/*\n Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-python-callbacks.c",
"chars": 10859,
"preview": "/*\n Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-python-callgraph.c",
"chars": 4715,
"preview": "/*\n Copyright 2011, 2012, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012, 2015 Red Hat, Inc.\n\n Thi"
},
{
"path": "gcc-python-cfg.c",
"chars": 11582,
"preview": "/*\n Copyright 2011, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2013 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-python-closure.c",
"chars": 3926,
"preview": "/*\n Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-python-closure.h",
"chars": 1761,
"preview": "/*\n Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-python-compat.h",
"chars": 2354,
"preview": "/*\n Copyright 2011, 2012, 2014 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012, 2014 Red Hat, Inc.\n\n Thi"
},
{
"path": "gcc-python-diagnostics.c",
"chars": 6019,
"preview": "/*\n Copyright 2011-2013, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2017 Red Hat, Inc.\n\n This "
},
{
"path": "gcc-python-docs",
"chars": 849,
"preview": "#!/bin/sh\n# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free sof"
},
{
"path": "gcc-python-function.c",
"chars": 5243,
"preview": "/*\n Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-python-gimple.c",
"chars": 10624,
"preview": "/*\n Copyright 2011-2013, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2015 Red Hat, Inc.\n\n This "
},
{
"path": "gcc-python-location.c",
"chars": 7888,
"preview": "/*\n Copyright 2011-2013, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2017 Red Hat, Inc.\n\n This "
},
{
"path": "gcc-python-option.c",
"chars": 5477,
"preview": "/*\n Copyright 2011, 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012, 2013 Red Hat, Inc.\n\n Thi"
},
{
"path": "gcc-python-parameter.c",
"chars": 1541,
"preview": "/*\n Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-python-pass.c",
"chars": 19679,
"preview": "/*\n Copyright 2011-2013, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2015 Red Hat, Inc.\n\n This "
},
{
"path": "gcc-python-plugin.spec",
"chars": 9729,
"preview": "Name: gcc-python-plugin\nVersion: 0.17\nRelease: 1%{?dist}\nSummary: GCC plugin that embeds "
},
{
"path": "gcc-python-pretty-printer.c",
"chars": 3316,
"preview": "/*\n Copyright 2011, 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2013 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-python-rtl.c",
"chars": 5580,
"preview": "/*\n Copyright 2011-2013, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2015 Red Hat, Inc.\n\n This "
},
{
"path": "gcc-python-tree.c",
"chars": 35566,
"preview": "/*\n Copyright 2011-2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2015 Red Hat, Inc.\n\n This is free soft"
},
{
"path": "gcc-python-variable.c",
"chars": 1460,
"preview": "/*\n Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-python-version.c",
"chars": 2559,
"preview": "/*\n Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011, 2012 Red Hat, Inc.\n\n This is free so"
},
{
"path": "gcc-python-wrapper.c",
"chars": 12873,
"preview": "/*\n Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n Copyright 2012 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "gcc-python-wrappers.h",
"chars": 14240,
"preview": "/*\n Copyright 2011-2013, 2015, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2015, 2017 Red Hat, In"
},
{
"path": "gcc-python.c",
"chars": 27196,
"preview": "/*\n Copyright 2011-2013, 2015 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2015 Red Hat, Inc.\n\n This "
},
{
"path": "gcc-python.h",
"chars": 12228,
"preview": "/*\n Copyright 2011-2013, 2015, 2017 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011-2013, 2015, 2017 Red Hat, In"
},
{
"path": "gcc-with-cpychecker",
"chars": 4185,
"preview": "#!/usr/bin/env python\n# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This"
},
{
"path": "gcc-with-python",
"chars": 818,
"preview": "#!/bin/sh\n# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free sof"
},
{
"path": "gccutils/__init__.py",
"chars": 23526,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "gccutils/dot.py",
"chars": 2595,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gccutils/graph/__init__.py",
"chars": 11325,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gccutils/graph/ivpgraph.py",
"chars": 10054,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gccutils/graph/query.py",
"chars": 5626,
"preview": "# Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2013 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gccutils/graph/stmtgraph.py",
"chars": 12218,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gccutils/graph/supergraph.py",
"chars": 11856,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "gccutils/selftests.py",
"chars": 1214,
"preview": "# Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2013 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "generate-callgraph-c.py",
"chars": 5460,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "generate-casts-c.py",
"chars": 4050,
"preview": "# Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2013 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "generate-cfg-c.py",
"chars": 9667,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "generate-config-h.py",
"chars": 4963,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "generate-function-c.py",
"chars": 4522,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "generate-gimple-c.py",
"chars": 24332,
"preview": "# Copyright 2011, 2012, 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012, 2013 Red Hat, Inc.\n#\n# Th"
},
{
"path": "generate-location-c.py",
"chars": 6930,
"preview": "# Copyright 2011-2014, 2017 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011-2014, 2017 Red Hat, Inc.\n#\n# This"
},
{
"path": "generate-option-c.py",
"chars": 3793,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "generate-parameter-c.py",
"chars": 4630,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "generate-pass-c.py",
"chars": 6405,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "generate-passes-svg.py",
"chars": 6042,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "generate-pretty-printer-c.py",
"chars": 1877,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "generate-rtl-c.py",
"chars": 6609,
"preview": "# Copyright 2011-2012, 2015 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011-2012, 2015 Red Hat, Inc.\n#\n# This"
},
{
"path": "generate-tables-of-passes-rst.py",
"chars": 3776,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "generate-tree-c.py",
"chars": 33996,
"preview": "# Copyright 2011-2013, 2015 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011-2013, 2015 Red Hat, Inc.\n#\n# This"
},
{
"path": "generate-variable-c.py",
"chars": 2795,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "gimple-types.txt.in",
"chars": 334,
"preview": "#define DEFGSCODE(GIMPLE_symbol, printable_name, GSS_symbol) \\\n GIMPLE_symbol, printable_name, GSS_symbol\n#include \"g"
},
{
"path": "libcpychecker/PyArg_ParseTuple.py",
"chars": 14696,
"preview": "# Copyright 2011, 2013 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2013 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "libcpychecker/Py_BuildValue.py",
"chars": 9459,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker/__init__.py",
"chars": 5326,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker/absinterp.py",
"chars": 124488,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "libcpychecker/attributes.py",
"chars": 5281,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "libcpychecker/c_stdio.py",
"chars": 2959,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker/compat.py",
"chars": 3363,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker/diagnostics.py",
"chars": 10496,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "libcpychecker/formatstrings.py",
"chars": 18784,
"preview": "# Copyright 2011, 2016 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2016 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "libcpychecker/initializers.py",
"chars": 7216,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker/refcounts.py",
"chars": 211343,
"preview": "# Copyright 2011, 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011, 2012 Red Hat, Inc.\n#\n# This is free s"
},
{
"path": "libcpychecker/types.py",
"chars": 3457,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker/utils.py",
"chars": 1325,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker/visualizations.py",
"chars": 15275,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "libcpychecker_html/TODO",
"chars": 1274,
"preview": "# Copying and distribution of this file, with or without modification,\n# are permitted in any medium without royalty pro"
},
{
"path": "libcpychecker_html/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "libcpychecker_html/c-api.txt",
"chars": 21315,
"preview": "# Copyright 2012 Buck Golemon <buck@yelp.com>\n#\n# This is free software: you can redistribute it and/or modify it\n# "
},
{
"path": "libcpychecker_html/capi.py",
"chars": 1431,
"preview": "# Copyright 2012 Buck Golemon <buck@yelp.com>\n#\n# This is free software: you can redistribute it and/or modify it\n# "
},
{
"path": "libcpychecker_html/foo.html",
"chars": 140667,
"preview": "<!DOCTYPE html>\n<html><head><meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\"><title>_mysql.c -- GCC Py"
},
{
"path": "libcpychecker_html/html_to_lxml.py",
"chars": 2520,
"preview": "#!/usr/bin/env python\n\"\"\"transform html into lxml statements\"\"\"\n\n# Copyright 2012 Buck Golemon <buck@yelp.com>\n#\n# T"
},
{
"path": "libcpychecker_html/json.rst",
"chars": 8317,
"preview": "Notes on JSON serialization of error reports\n============================================\n\nAt the top level::\n\n {\n "
},
{
"path": "libcpychecker_html/make_html.py",
"chars": 10054,
"preview": "#!/usr/bin/env python\n\"\"\"Make our data into HTML!\nThese reports should be usable as email attachments, offline.\nThis mea"
},
{
"path": "libcpychecker_html/script.js",
"chars": 5351,
"preview": "/* Copyright 2012 Buck Golemon <buck@yelp.com>\n \n This is free software: you can redistribute it and/or modify it\n "
},
{
"path": "libcpychecker_html/style-noprefix.css",
"chars": 7712,
"preview": "/* Copyright 2012 Buck Golemon <buck@yelp.com>\n * with help from http://jsfiddle.net/simevidas/udyTs/show/light/\n \n "
},
{
"path": "libcpychecker_html/style.css",
"chars": 10231,
"preview": "/* Copyright 2012 Buck Golemon <buck@yelp.com>\n * with help from http://jsfiddle.net/simevidas/udyTs/show/light/\n \n "
},
{
"path": "libcpychecker_html/test/example1/bug.c",
"chars": 420,
"preview": "#include <Python.h>\n\nPyObject *\nmake_a_list_of_random_ints_badly(PyObject *self,\n PyObje"
},
{
"path": "libcpychecker_html/test/example1/bug.c.make_a_list_of_random_ints_badly.json",
"chars": 393454,
"preview": "{\n \"filename\": \"libcpychecker_html/test/example1/bug.c\", \n \"function\": {\n \"lines\": [\n 3, \n "
},
{
"path": "libcpychecker_html/test/example2/_pylibmcmodule.h",
"chars": 15719,
"preview": "/**\n * _pylibmc: hand-made libmemcached bindings for Python\n *\n * Copyright (c) 2008, Ludvig Ericson\n * All rights reser"
},
{
"path": "libcpychecker_html/test/example2/pylibmc-issue-68.c",
"chars": 6708,
"preview": "/*\n Example of a historical reference-counting error:\n\n The code below was extracted from:\n https://github.com/leri"
},
{
"path": "libcpychecker_html/test/example2/pylibmc-issue-68.c.PylibMC_Client_get_multi.json",
"chars": 82657,
"preview": "{\n \"filename\": \"libcpychecker_html/test/example2/pylibmc-issue-68.c\", \n \"function\": {\n \"lines\": [\n "
},
{
"path": "libcpychecker_html/test/example3/_mysql.c",
"chars": 7731,
"preview": "/*\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public Lic"
},
{
"path": "maketreetypes.py",
"chars": 4002,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "misc/fedora/bugreporting.py",
"chars": 6314,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "misc/fedora/bugreports.txt",
"chars": 30691,
"preview": "# Contains a series of lines of the form\n#\n# (1) Filed bugs:\n# FEDORA-SRPM-NAME-VERSION-RELEASE rhbz#FEDORA-BUG-"
},
{
"path": "misc/fedora/fake-g++.py",
"chars": 2018,
"preview": "#!/usr/bin/env python\n# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This"
},
{
"path": "misc/fedora/fake-gcc.py",
"chars": 2018,
"preview": "#!/usr/bin/env python\n# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This"
},
{
"path": "misc/fedora/get-srpms.py",
"chars": 4659,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "misc/fedora/makeindex.py",
"chars": 19409,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "misc/fedora/mass-rebuild.py",
"chars": 10880,
"preview": "# Copyright 2012 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2012 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "print-gcc-version.c",
"chars": 920,
"preview": "/*\n Copyright 2013 David Malcolm <dmalcolm@redhat.com>\n Copyright 2013 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "rtl-types.txt.in",
"chars": 127,
"preview": "#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) \\\n rtl_expr: ENUM, NAME, FORMAT, CLASS\n#include \"rtl.def\"\n#undef DEF_RT"
},
{
"path": "run-test-suite.py",
"chars": 36288,
"preview": "# Copyright 2011-2015 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011-2015 Red Hat, Inc.\n#\n# This is free sof"
},
{
"path": "test-builder.py",
"chars": 2890,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "test.c",
"chars": 1186,
"preview": "/*\n Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "test.py",
"chars": 4676,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "testcpybuilder.py",
"chars": 7080,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "testcpychecker.py",
"chars": 21837,
"preview": "# -*- coding: utf-8 -*-\n# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# Th"
},
{
"path": "tests/cpychecker/PyArg_Parse/incorrect_codes_S_and_U/input.c",
"chars": 1146,
"preview": "/*\n Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n Copyright 2011 Red Hat, Inc.\n\n This is free software: you "
},
{
"path": "tests/cpychecker/PyArg_Parse/incorrect_codes_S_and_U/metadata.ini",
"chars": 100,
"preview": "[ExpectedBehavior]\n# We expect only compilation *warnings*, so we expect a 0 exit code\nexitcode = 0\n"
},
{
"path": "tests/cpychecker/PyArg_Parse/incorrect_codes_S_and_U/script.py",
"chars": 779,
"preview": "# Copyright 2011 David Malcolm <dmalcolm@redhat.com>\n# Copyright 2011 Red Hat, Inc.\n#\n# This is free software: you"
},
{
"path": "tests/cpychecker/PyArg_Parse/incorrect_codes_S_and_U/stderr.txt",
"chars": 707,
"preview": "In function 'incorrect_usage_of_S_and_U':\ntests/cpychecker/PyArg_Parse/incorrect_codes_S_and_U/input.c:33:nn: warning: M"
}
]
// ... and 1185 more files (download for full content)
About this extraction
This page contains the full source code of the davidmalcolm/gcc-python-plugin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1385 files (40.4 MB), approximately 1.3M tokens, and a symbol index with 2471 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.