Typz added a comment.

In https://reviews.llvm.org/D33440#920205, @djasper wrote:

> Out of curiosity, will this be able to fix the two situations that you get 
> for python extension?
>  There, you usually have a PyObject_HEAD with out semicolon in a struct and 
> than a PyObject_HEAD_INIT(..) in a braced init list. More info:
>  http://starship.python.net/crew/mwh/toext/node20.html


`PyObject_HEAD` is defined (by defaut) as:

  Py_ssize_t ob_refcnt;
  PyTypeObject *ob_type;

so declaring it as a statement macro should allow clang-format to process it 
correctly. (though this is a variable-like macro, so I need to check if this 
case is supported)

`PyObject_HEAD_INIT` ends with a comma, which is not supported yet. We would 
need to add another kind of macro to support that case.


https://reviews.llvm.org/D33440



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to