ethanhs / clang

Unofficial Python bindings to libclang
Other
27 stars 6 forks source link

tls_kind property cause segfault when called on a MACRO_DEFINITION #8

Closed Delaunay closed 4 years ago

Delaunay commented 4 years ago

Macro do not have TLS kind set but python should not segfault because of it.

Delaunay commented 4 years ago

There is more cusor type that cause the segmentation fault. and storage class can create a segmentation fault as well

    CursorKind.MACRO_DEFINITION: {'tls_kind', 'storage_class'},
    CursorKind.MACRO_INSTANTIATION: {'tls_kind', 'storage_class'},
    CursorKind.DECL_STMT: {'tls_kind'},
    CursorKind.PAREN_EXPR: {'tls_kind'},
    CursorKind.CSTYLE_CAST_EXPR: {'tls_kind'},
    CursorKind.INTEGER_LITERAL: {'tls_kind'},
    CursorKind.STRING_LITERAL: {'tls_kind'},
    CursorKind.UNARY_OPERATOR: {'tls_kind'},
    CursorKind.BINARY_OPERATOR: {'tls_kind'},
    CursorKind.DECL_REF_EXPR: {'tls_kind'},
    CursorKind.FLOATING_LITERAL: {'tls_kind'},
    CursorKind.CALL_EXPR: {'tls_kind'},
ethanhs commented 4 years ago

You should file issues with the llvm issue tracker or https://github.com/trolldbois/python-clang, I don't maintain this anymore, sorry