1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Fix for PR 96762: DOM indexer misses some obvious symbols

Fixed calculation of file locations for names inside macro definitions.
This commit is contained in:
Vladimir Hirsl 2005-05-02 17:44:39 +00:00
parent e95f21d2d8
commit 8fb7e7383f
2 changed files with 9 additions and 5 deletions

View file

@ -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

View file

@ -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;