mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 04:35:45 +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:
parent
e95f21d2d8
commit
8fb7e7383f
2 changed files with 9 additions and 5 deletions
|
@ -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
|
2005-04-28 Alain Magloire
|
||||||
Patch from Devlin Steffler
|
Patch from Devlin Steffler
|
||||||
FIXED 84606- CDT needs to take advantage of background refresh of projects
|
FIXED 84606- CDT needs to take advantage of background refresh of projects
|
||||||
|
|
|
@ -74,12 +74,10 @@ public class IndexEncoderUtil {
|
||||||
IASTFileLocation fileLoc = null;
|
IASTFileLocation fileLoc = null;
|
||||||
|
|
||||||
IASTNodeLocation[] locs = node.getNodeLocations();
|
IASTNodeLocation[] locs = node.getNodeLocations();
|
||||||
if (locs.length == 1) {
|
if (locs.length == 1 && locs[0] instanceof IASTFileLocation) {
|
||||||
if (locs[0] instanceof IASTFileLocation) {
|
fileLoc = (IASTFileLocation) locs[0];
|
||||||
fileLoc = (IASTFileLocation) locs[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (locs.length > 1) {
|
else if (locs.length > 0) {
|
||||||
fileLoc = node.getTranslationUnit().flattenLocationsToFile(locs);
|
fileLoc = node.getTranslationUnit().flattenLocationsToFile(locs);
|
||||||
}
|
}
|
||||||
return fileLoc;
|
return fileLoc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue