__read_cv_qualified_type only checks for one attribute, not both. If attrs.has_key( XML_AN_CONST ) then it doesn't check for attrs.has_key( XML_AN_VOLATILE ) even though both of these are true.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Reads pygccxml_bug.h and prints the declarations
I didn't realise I could only submit one file!
If you create a file called pygccxml_bug.h with the contents:
void PygccxmlBug(int const volatile* icv);
When you parse the file, the output is as follows:
free_function_t: 'PygccxmlBug'
location: [/home/davidh/pygccxml_bug.h]:2
artificial: 'False'
demangled: PygccxmlBug(int const volatile*)
mangled: _Z11PygccxmlBugPVKi
return type: void
arguments type: int const * icv
The demangled function name includes int const volatile* but the arguments type is only int const*
I believe the problem is due to the fact that the CvQualifiedType in the xml file has both the const and volatile attribute:
<CvQualifiedType id="_128cv" type="_128" const="1" volatile="1"/>
__read_cv_qualified_type only checks for one attribute, not both. If attrs.has_key( XML_AN_CONST ) then it doesn't check for attrs.has_key( XML_AN_VOLATILE ) even though both of these are true.
Thanks for bug reporting. I fixed the issue you reported. Sorry for late response.