This is an archive of the discontinued LLVM Phabricator instance.

[libclang/python] Add bindings for children of diagnostics
ClosedPublic

Authored by hansonw on Mar 2 2016, 8:59 PM.

Details

Summary

This exposes the Clang API bindings clang_getChildDiagnostics (which returns a CXDiagnosticSet) and clang_getNumDiagnosticsInSet / clang_getDiagnosticInSet (to traverse the CXDiagnosticSet), and adds a helper children property in the Python Diagnostic wrapper.

Also, this adds the missing OVERLOAD_CANDIDATE (700) cursor type.

Diff Detail

Event Timeline

hansonw updated this revision to Diff 49704.Mar 2 2016, 8:59 PM
hansonw retitled this revision from to [libclang/python] Add bindings for children of diagnostics.
hansonw updated this object.
hansonw added reviewers: klimek, milianw.

Adding you guys since you reviewed some recent changes :)

compnerd accepted this revision.Apr 28 2016, 9:24 PM
compnerd edited edge metadata.
compnerd added inline comments.
bindings/python/clang/cindex.py
369

Why does this need the explicit int construction?

This revision is now accepted and ready to land.Apr 28 2016, 9:24 PM

Thanks! I don't have commit permissions; could you check this in for me?

bindings/python/clang/cindex.py
369

This returns a long on 64-bit systems - however __len__ must return a plain int.

compnerd closed this revision.Apr 30 2016, 2:20 PM

Committed as SVN r268167. Thanks for the patch!