Bug 34438 - class parser works not correctly with some macros
Summary: class parser works not correctly with some macros
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 2.0.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop-Devel List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-03 09:18 UTC by andreaswuest
Modified: 2013-03-31 00:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreaswuest 2001-11-03 09:11:26 UTC
(*** This bug was imported into bugs.kde.org ***)

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)
Comment 1 Caleb Tennis 2002-10-09 21:47:19 UTC
This one persists in Gideon. 
Comment 2 Eray Ozkural 2003-02-27 13:11:54 UTC
This looks like an important bug, we should consider proper use of CPP preceding 
syntactic analysis, Roberto? 
 
I'm voting for it. Must fix before beta. 
 
Comment 3 Jesse 2003-07-13 01:16:31 UTC
As of cvs HEAD I can not reproduce this bug.  Anyone else? 
Comment 4 Andreas Koepfle 2003-10-20 02:38:52 UTC
This problem is no longer present in CVS head. Closing.
Comment 5 Aleix Pol 2013-03-31 00:51:39 UTC
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively