Bug 160287 - C++ import does not preprocess properly #if's
Summary: C++ import does not preprocess properly #if's
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Ralf Habacker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-03 02:27 UTC by vittor
Modified: 2014-01-29 06:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vittor 2008-04-03 02:27:33 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.2 
OS:                Linux

When importing the following code, classes Class3 & Class4 are created instead of Class2 and Class 4.


#define Zero 0
#define One 1

#if 0
class Class1 {};
#endif

#if 1
class Class2 {};
#endif

#if Zero
class Class3 {};
#endif

#if One
class Class4 {};
#endif
Comment 1 vittor 2008-04-03 03:36:42 UTC
Now classes Class2, Class3 & Class4 are created instead of Class2 and Class 4: macros are not substituted in #if directives.
Comment 2 Ralf Habacker 2014-01-22 17:42:45 UTC
Git commit ba07c01dea08c011393237a8d3e9ebc0a0604dc0 by Ralf Habacker.
Committed on 22/01/2014 at 11:27.
Pushed by habacker into branch 'master'.

Evaluate macro expressions.

M  +15   -2    umbrello/codeimport/kdevcppparser/preprocesslexer.cpp
M  +1    -0    umbrello/codeimport/kdevcppparser/preprocesslexer.h

http://commits.kde.org/umbrello/ba07c01dea08c011393237a8d3e9ebc0a0604dc0
Comment 3 Ralf Habacker 2014-01-22 17:46:01 UTC
Git commit 67ce352b4e7b0db6784ab08910c3b42e9fdb11cf by Ralf Habacker.
Committed on 22/01/2014 at 11:27.
Pushed by habacker into branch 'KDE/4.12'.

Evaluate macro expressions.
FIXED-IN:2.12.2
FIXED-IN:4.11.6
(cherry picked from commit ba07c01dea08c011393237a8d3e9ebc0a0604dc0)

M  +15   -2    umbrello/codeimport/kdevcppparser/preprocesslexer.cpp
M  +1    -0    umbrello/codeimport/kdevcppparser/preprocesslexer.h

http://commits.kde.org/umbrello/67ce352b4e7b0db6784ab08910c3b42e9fdb11cf
Comment 4 Ralf Habacker 2014-01-22 19:57:55 UTC
Git commit 7392b08d35402727b701829c7cfa66078b499fed by Ralf Habacker.
Committed on 22/01/2014 at 11:27.
Pushed by habacker into branch 'KDE/4.11'.

Evaluate macro expressions.
FIXED-IN:4.11.6
(cherry picked from commit ba07c01dea08c011393237a8d3e9ebc0a0604dc0)

Conflicts:
	umbrello/codeimport/kdevcppparser/preprocesslexer.h

M  +15   -2    umbrello/codeimport/kdevcppparser/preprocesslexer.cpp
M  +1    -0    umbrello/codeimport/kdevcppparser/preprocesslexer.h

http://commits.kde.org/umbrello/7392b08d35402727b701829c7cfa66078b499fed