diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index d35959483b3..1e0ff3891c5 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,9 @@ +2005-05-02 Vladimir Hirsl + Fix for PR 96762: DOM indexer misses some obvious symbols + Fixed calculation of file locations for names inside macro definitions + + * index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java + 2005-04-28 Alain Magloire Patch from Devlin Steffler FIXED 84606- CDT needs to take advantage of background refresh of projects diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java index c2f5e06b00b..3afa3268031 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java @@ -74,12 +74,10 @@ public class IndexEncoderUtil { IASTFileLocation fileLoc = null; IASTNodeLocation[] locs = node.getNodeLocations(); - if (locs.length == 1) { - if (locs[0] instanceof IASTFileLocation) { - fileLoc = (IASTFileLocation) locs[0]; - } + if (locs.length == 1 && locs[0] instanceof IASTFileLocation) { + fileLoc = (IASTFileLocation) locs[0]; } - else if (locs.length > 1) { + else if (locs.length > 0) { fileLoc = node.getTranslationUnit().flattenLocationsToFile(locs); } return fileLoc;