After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796094 - Backslashes in default values confuse the parser (and cause params to be ignored)
Backslashes in default values confuse the parser (and cause params to be igno...
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.8.13
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2018-05-14 09:01 UTC by Marcin Kasperski
Modified: 2018-07-30 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marcin Kasperski 2018-05-14 09:01:46 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="");
Comment 1 Marcin Kasperski 2018-05-14 09:27:37 UTC
The problem appears also on tip ( df0d9c3df44dbce633c38e99d33be4de06706f7b )
Comment 2 Marcin Kasperski 2018-05-14 09:37:45 UTC
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
Comment 3 albert 2018-05-14 12:55:45 UTC
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).
Comment 4 Marcin Kasperski 2018-05-14 15:46:59 UTC
Patch seems to help.
Comment 5 albert 2018-06-10 10:03:45 UTC
Code has been integrated in master on github.
Comment 6 André Klapper 2018-07-30 10:13:41 UTC
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!