Bug#34438: class parser works not correctly with some macros

AndreasWuest at gmx.de AndreasWuest at gmx.de
Sat Nov 3 09:11:26 UTC 2001


Package: kdevelop
Version: 2.0.1 (using KDE 2.2.1 )
Severity: normal
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:                Linux (i686) release 2.2.19
OS/Compiler notes: 

Hi,

the KDevelop Class parser seems to have problems with macros that do
not end with a ";". Just take a look at the following example :

--- HEADER.h BEGIN -----
ifndef MYCLASS_H
#define MYCLASS_H

#include <qobject.h>

//works
#define USING_NAMESPACE(x) using namespace x;
USING_NAMESPACE(std);

//does not work
#define USING_NAMESPACE(x) using namespace x;
USING_NAMESPACE(std)

class MyClass
{
  Q_OBJECT
public:
  MyClass();
  ~MyClass();
protected slots:
  void something ();
};
#endif
------ HEADER.H END ----------------------

------ IMPLEMENT.H BEGIN -----------------
#include "myclass.h"

MyClass::MyClass() {
}

MyClass::~MyClass() {
}

void MyClass::something () {
}
------ IMPLEMENT.H END  -----------------

If you remove the second define and macro the parser works
without problems, but if you remove the first define and
macro the class MyClass is not shown at all in the class
browser. Now if you add a ";" to the USING_NAMESPACE macro
everything works again, and the class is shown correctly.





(Submitted via bugs.kde.org)
(Called from KBugReport dialog)


-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list