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.
see source code from testTwoMacros test in BasicHyperlinkTestCase. If I open the code in the IDE and change twoMacros2.c so that it includes twoMacros2.h (not twoMacros2.h) and save the file, hyperlink on ABC from twoMacros2.h still goes to twoMacros2.c.
still valid, steps to reproduce: create a project with 3 files: source.cc #define A #include "1.h" 1.h #ifdef A #define XXX #endif 2.h #ifdef A #define XXX #endif After that in 1.h hyperlink on A goes to macro definition in source.cc, in 2.h A goes nowhere and undefined. Now change include in source.cc to 2.h. After that both headers are highlighted as if A is defined and in 1.h hyperlink on A still goes to source.cc and now dead code is highlighted.
Fix is very risky and complicated.
fixed in enum, change set: 9e3d45fe3360
Created attachment 157272 [details] additional fix
Integrated into 'main-silver', will be available in build *201511120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/911eb7bc3507 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #216611 Change in include directive causes wrong macro hyperlink (transplanted from 9e3d45fe33607b9fff3b708bdb1e76bfccdd7c7e)
fixed on enum, change set: 68de5a3328c6
Integrated into 'main-silver', will be available in build *201511240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0891f565bcc7 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug 216611 Change in include directive causes wrong macro hyperlink (transplanted from 68de5a3328c67a68aa77bb021f317579248ac66e)
Verified in NetBeans 8.1 patch1