Closed taillonm closed 8 years ago
Thanks. Fixed by commit b367e2db71910f088856849fd2990207cf5841c4.
If you write instead
class TestClass
{
protected:
template <class T> class TemplateSubclass
{
public:
T mData;
};
typedef TemplateSubclass<double> mInstance;
};
then the attribute "access" is completely missing. Before this bugfix, the attribute was there, of course always with value "public".
@PhilMarek thanks for pointing this out. It seems Clang is reporting AS_none
as the access for the incomplete class type (the typedef does not cause the full type to be instantiated). Prior to the change here CastXML incorrectly treated AS_none
as equivalent to AS_public
. I think no access information is better than wrong access information. Further investigation will be needed to see if proper access information can be determined.
In commit c7de52912ca365accc004b01ba95a2bfebe14b0e I improve the fix to handle the incomplete case too.
If you run castxml on this code:
then the class TemplateSubclass has access="public" instead of "protected" like other non template classes.