mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 02:36:01 +02:00
Open Declaration shows macros twice, bug 222597.
This commit is contained in:
parent
e5b6fb457b
commit
7b37526690
1 changed files with 26 additions and 33 deletions
|
@ -535,14 +535,8 @@ public class CIndex implements IIndex {
|
||||||
}
|
}
|
||||||
|
|
||||||
private IIndexMacro[] findMacros(char[] name, boolean isPrefix, boolean caseSensitive, IndexFilter filter, IProgressMonitor monitor) throws CoreException {
|
private IIndexMacro[] findMacros(char[] name, boolean isPrefix, boolean caseSensitive, IndexFilter filter, IProgressMonitor monitor) throws CoreException {
|
||||||
if (SPECIALCASE_SINGLES && fFragments.length==1) {
|
// macros can be represented multiple times when a header is parsed in c- and c++ context,
|
||||||
try {
|
// so there is no special case for indexes with single fragments.
|
||||||
return fFragments[0].findMacros(name, isPrefix, caseSensitive, filter, monitor);
|
|
||||||
} catch (CoreException e) {
|
|
||||||
CCorePlugin.log(e);
|
|
||||||
return IIndexMacro.EMPTY_INDEX_MACRO_ARRAY;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
monitor= new NullProgressMonitor();
|
monitor= new NullProgressMonitor();
|
||||||
}
|
}
|
||||||
|
@ -573,7 +567,6 @@ public class CIndex implements IIndex {
|
||||||
monitor.done();
|
monitor.done();
|
||||||
return result.toArray(new IIndexMacro[result.size()]);
|
return result.toArray(new IIndexMacro[result.size()]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public long getCacheHits() {
|
public long getCacheHits() {
|
||||||
long result= 0;
|
long result= 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue