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 646003 - Doxygen doesn't recognize class with a macro around it
Doxygen doesn't recognize class with a macro around it
Status: RESOLVED NOTABUG
Product: doxygen
Classification: Other
Component: build
unspecified
Other Windows
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-03-28 19:26 UTC by Erwin Coumans
Modified: 2012-11-18 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Erwin Coumans 2011-03-28 19:26:23 UTC
Doxygen doesn't expand the following macro around the class. It looks like the macro is not expanded properly, while actual C++ compilers work fine.
As a result, Doxygen doesn't pick up the MyAlignedClass in the following C++ reproduction case:


#ifndef _MACRO_TEST_H
#define _MACRO_TEST_H

#ifdef _WIN32
	#define ATTRIBUTE_ALIGNED128(a) __declspec(align(128)) a
#else
	#define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
#endif


ATTRIBUTE_ALIGNED128(class) MyAlignedClass
//class MyAlignedClass
{
	int m_test;
	
	public:
		MyAlignedClass()
	{
		
	}
	
};

#endif
Comment 1 Dimitri van Heesch 2011-04-02 13:47:34 UTC
I works fine if you use the following settings:

ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
PREDEFINED             = ATTRIBUTE_ALIGNED128(x)=x

See http://www.doxygen.org/preprocessing.html for more info.
Comment 2 Erwin Coumans 2011-04-18 17:47:18 UTC
Thanks, that did the job!