Patch: Add isAbstract to libclang

"Matthäus G. Chajdas" clang at anteru.net
Wed Nov 5 12:36:09 PST 2014


Hi,

first time patch submission here. The attached patch adds
clang_Type_isAbstractCXXClass, which forwards to
CXXRecordDecl::isAbstract. Reason is that figuring out whether a class
is abstract or not is very hard from the AST. I've also added the
appropriate Python binding.

If there is interest to cover other CXXRecordDecl methods (like
hasTrivialDefaultConstructor, etc.), I can also add them.

I'm also not sure about the nomenclature; I added this as
isAbstractCXXClass so it's easy to add the remaining CXXRecordDecl
accessors without name clashes; however, in the Python bindings, I used
is_abstract_class() without CXX (similar to how the CXXReference is
handled in the bindings.)

Cheers,
  Matthäus


-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-type-cxx-is-abstract.patch
Type: text/x-patch
Size: 3608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141105/b01e2fff/attachment.bin>


More information about the cfe-commits mailing list