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 220310 - Incorrect find usages results
Summary: Incorrect find usages results
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.3
Hardware: PC Solaris
: P2 normal (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-17 16:11 UTC by Egor Ushakov
Modified: 2012-10-25 01:34 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 Egor Ushakov 2012-10-17 16:11:09 UTC
steps to reproduce:
- open mozilla project
- navigate to class A from the file opmember.cpp
- try to find usages of this class
It will give more than 500 results and most of them incorrect like:
- struct NS_STACK_CLASS A {}
- incremet_and_xor(unsigned char *A, unsigned char *T)
...
Comment 1 Egor Ushakov 2012-10-22 09:50:10 UTC
if unable to reproduce, use class A from nsTestCrasher.cpp
Comment 2 Vladimir Voskresensky 2012-10-22 10:18:25 UTC
class A {

};

#define ALEN(A) (sizeof(A)/sizeof(A[0]))

A class should not be found in #define
because in #define it is macro param name, not reference to A class
Comment 3 Vladimir Voskresensky 2012-10-22 10:23:05 UTC
incremet_and_xor(unsigned char *A, unsigned char *T) problem is due to FU working in dead code.
It can be solved using FU filters presentation (will be handled as issue #218201)
Comment 4 Vladimir Voskresensky 2012-10-22 11:15:10 UTC
expected solution is to have simple state machine understanding completion/hyperlink in preprocessor directives instead of direct use of c++ completion which consider directives as part of global context
Comment 6 Quality Engineering 2012-10-25 01:34:15 UTC
Integrated into 'main-golden', will be available in build *201210250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bf486f5b5014
User: Nikolay Krasilnikov <nnnnnk@netbeans.org>
Log: fixed #220310 - Incorrect find usages results