GNOME Bugzilla – Bug 796094
Backslashes in default values confuse the parser (and cause params to be ignored)
Last modified: 2018-07-30 10:13:41 UTC
Summary ========= Doxygen fails to parse default values with backslashes, like string someFunc(const string& splitOn = " \n"); (it seems any backslash inside default value suffices, I saw it on "\t\r\n", "\n" and some similar) The problem appears in 1.8.13 but was not present in 1.8.11 Detailed example ====================== // doxygen 1.18.13 fails to parse parameters with default values containing backslash. // In older versions they worked correctly. // // To test: // doxygen -g test // doxygen test // // Problems: // // - the following warnings are reported: // // problem.hxx:31: warning: argument 'value' of command @param is not found in the argument list of ThisFails() // problem.hxx:37: warning: argument 'value' of command @param is not found in the argument list of ThisFailsToo(const string &arg1) // problem.hxx:37: warning: argument 'arg2' of command @param is not found in the argument list of ThisFailsToo(const string &arg1) // // - in generated docs, doxygen claims the following signatures: // // string ThisFails ( ) // // string ThisFailsToo ( const string & arg1) /** @file **/ #include <string> using std::string; /** @param value Some value **/ string ThisWorks(const string& value); /** @param value Some value **/ string ThisWorksToo(const string& value = "abc def"); /** @param value Some value **/ string ThisFails(const string& value = " \r\n"); /** @param value Some value @param arg1 Some arg1 @param arg2 Some arg2 **/ string ThisFailsToo(const string& arg1, const string& value = " \r\n", const string& arg2="");
The problem appears also on tip ( df0d9c3df44dbce633c38e99d33be4de06706f7b )
I bisected this over doxygen sources, and: 00ee930a1d73e11885197102c54fd4c8141127da is the first bad commit commit 00ee930a1d73e11885197102c54fd4c8141127da Author: Dimitri van Heesch <dimitri@stack.nl> Date: Sun Mar 13 10:12:46 2016 +0100 reimplemented removeRedundantWhiteSpace() to improve performance :040000 040000 a908941df67bfbaf98296f4c21cdf598e2bdd27e 292dea8493787d9b7c1af6efb6e3297489a440d6 M src
Thanks for the work on the bisection to the commit. I've just pushed a proposed patch to github (pull request 724, https://github.com/doxygen/doxygen/pull/724).
Patch seems to help.
Code has been integrated in master on github.
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to https://github.com/doxygen/doxygen/issues All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github. Hence I am closing this GNOME Bugzilla ticket. Please use the corresponding ticket in Github instead. Thanks a lot!