This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253964 - [newcodemodel] incorrect "-D __cplusplus" in navigator
Summary: [newcodemodel] incorrect "-D __cplusplus" in navigator
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-29 23:11 UTC by Vladimir Voskresensky
Modified: 2015-08-17 11:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2015-07-29 23:11:32 UTC
regression:
create empty C++ header file => it has "-D __cplusplus" entry in navigator which jumps to the zero location of file

#ifndef NEWFILE_H
#define NEWFILE_H

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif

#endif /* NEWFILE_H */
Comment 1 Vladimir Voskresensky 2015-07-29 23:48:57 UTC
http://hg.netbeans.org/cnd-main/rev/dace4c061d43
Comment 2 Quality Engineering 2015-07-31 01:51:31 UTC
Integrated into 'main-silver', will be available in build *201507310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/dace4c061d43
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #253964 - [newcodemodel] incorrect "-D __cplusplus" in navigator
- we can not register system macro in files' FileContent
Comment 3 Alexander Simon 2015-08-16 20:46:06 UTC
It is designed behaviour in new code model.
IMHO it is wrong issue.
Please describe what is wrong?
Comment 4 Vladimir Voskresensky 2015-08-17 11:01:59 UTC
Navigator shows macro declared in file
__cpluspplus is used, but not declared in header.
Compare with 
#define AA
in header
and 
#ifdef AA
in source
=> source file should not display AA in navigator, because it's only used, but not declared there