GNOME Bugzilla – Bug 634600
redefinition of typedef leads to declaration/definition missmatch
Last modified: 2011-01-03 19:01:07 UTC
Created attachment 174264 [details] typedef related declaration/definition mismatch test files This is a case of declaration/definition method mismatch when a typedef (public) defined in one class is used in another class via a redefinition of the type. Here's the example (source/config files included) : /** * classA * * This class has an internal (public) typedef defined */ class classA { public: /** * classA's internal typedef */ typedef unsigned short MyType; /** * @brief constructor */ classA() { } /** * @brief destructor */ ~classA() { } }; This code is part of the header file. The second class (classB) uses the classA's typdef directly in the declaration: /** * classB * * This class is using classA's internal (public) typdef */ class classB { public: /** * @brief constructor */ classB() {} /** * @brief constructor */ ~classB() {} /** * classB method using classA's internal (public) typedef directly */ void myMethod(classA::MyType var); }; Now, the source file's definition of myMethod uses the classA's type via a local redefinition: typedef classA::MyType myTypeShortcut; // method definition is using classA's typdef indirectly via the above redefinition void classB :: myMethod(myTypeShortcut var) { // do something here with my redefined type } The doxygen output (file included) warns that there is a mismatch between myMethod declaration/definition. The print out however lists the two as being identical: Searching for member function documentation... /home/marius/temp/doxygenTest/doxygenTypedefTest.cpp:8: warning: no matching class member found for void classB::myMethod(classA::MyType var) Possible candidates: void classB::myMethod(classA::MyType var) Note: I use the latest SVN version and the doxygen.cfg is generated via doxygen -g doxygen.cfg (with no other changes to the configuration file)
Confirmed. Should be fixed in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.7.3. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant.