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 666085 - [PATCH] Preprocessing of INCLUDE FILE not reflecting the contents
[PATCH] Preprocessing of INCLUDE FILE not reflecting the contents
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.6
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-12-13 13:53 UTC by Harpreet
Modified: 2012-02-25 15:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tar ball containing doxyfile and dummy source file (9.57 KB, application/x-compressed-tar)
2011-12-13 13:55 UTC, Harpreet
Details

Description Harpreet 2011-12-13 13:53:27 UTC
Hello Dimitri,

In 1.7.6 release you have added the a define manager to handle #define of files.
The problem that I am facing is that a class declared inside include file within guarded regions is not detected.

Check the attachment.

The problem is that if a file is included before it being preprocessed the defines get associated with the file when it was process as include file.
When you start preprocess the contextdefines dictionary includes the define for the same file from Define Manager. Which caused guard directive to fail and class declaration get missed from doxygen.

Following, can be one of the solution

119a120,131
>     void addFile(const char *fileName)
>     {
>       if (fileName==0) return;
>       //printf("DefineManager::addFile(%s)\n",fileName);
>       DefinesPerFile *dpf = m_fileMap.find(fileName);
>       if (dpf==0)
>       {
>           //printf("New file!\n");
>           dpf = new DefinesPerFile;
>           m_fileMap.insert(fileName,dpf);
>       }
>     }
2779c2791
<   DefineManager::instance().addFileToContext(g_yyFileName);
---
>   DefineManager::instance().addFile(g_yyFileName);

Thanks & Regards,
Harpreet Singh
Comment 1 Harpreet 2011-12-13 13:55:33 UTC
Created attachment 203338 [details]
tar ball containing doxyfile and dummy source file
Comment 2 Dimitri van Heesch 2011-12-13 18:33:45 UTC
Hi Harpreet,

This seems to be related with the comment block you put before the include guard. If you use:

#ifndef _VE_EVAL_CACHE_H
#define _VE_EVAL_CACHE_H

all seems to be fine. Can you check and let me know why you would want to document the #define of an include guard?
Comment 3 Dimitri van Heesch 2011-12-13 20:30:22 UTC
I think your fix is correct though, so I'll include it, just in case you or anyone else wants to document the include guard.
Comment 4 Dimitri van Heesch 2012-02-25 15:37:08 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.0. 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.