pygccxml
pygccxml copied to clipboard
incomplete declarations tree
Hello.
scanner_t.startElement method contains the following code:
rm1 = "f1" not in self.config.flags
names = [
"__va_list_tag",
"__NSConstantString_tag",
"__NSConstantString"]
if isinstance(obj, declarations.declaration_t):
if rm1 and str(obj.name) in names:
return
I completely don't understand the comment, it explains what it does, but not why. Second, this code creates incomplete declarations tree. For example, if a function uses "va_list" as the argument, the declarations tree will contain reference to unknown_t class instance. Thus preventing me to find out those functions. In my opinion this code does not belong to the scanner, but the user code. Also, even in case you have a very good reason to filter it, by default pygccxml should provide the view to the tree exactly as it was generated by castxml/gccxml.
The patch is trivial: in my opinion, the code should be deleted.
Regards, Roman