mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02:00
Bug 450888. Fixed inconsistent handling of significant macros.
This commit is contained in:
parent
0460895b24
commit
04042aeeb9
1 changed files with 4 additions and 2 deletions
|
@ -1248,7 +1248,9 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
||||||
ArrayList<FileInAST> orderedFileKeys= new ArrayList<>();
|
ArrayList<FileInAST> orderedFileKeys= new ArrayList<>();
|
||||||
|
|
||||||
final IIndexFileLocation topIfl = fResolver.resolveASTPath(ast.getFilePath());
|
final IIndexFileLocation topIfl = fResolver.resolveASTPath(ast.getFilePath());
|
||||||
FileContentKey topKey = new FileContentKey(linkageID, topIfl, ast.getSignificantMacros());
|
ISignificantMacros significantMacros = ast.isHeaderUnit() ?
|
||||||
|
ast.getSignificantMacros() : ISignificantMacros.NONE;
|
||||||
|
FileContentKey topKey = new FileContentKey(linkageID, topIfl, significantMacros);
|
||||||
enteredFiles.add(topKey);
|
enteredFiles.add(topKey);
|
||||||
IDependencyTree tree= ast.getDependencyTree();
|
IDependencyTree tree= ast.getDependencyTree();
|
||||||
IASTInclusionNode[] inclusions= tree.getInclusions();
|
IASTInclusionNode[] inclusions= tree.getInclusions();
|
||||||
|
@ -1256,7 +1258,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
||||||
collectOrderedFileKeys(linkageID, inclusion, enteredFiles, orderedFileKeys);
|
collectOrderedFileKeys(linkageID, inclusion, enteredFiles, orderedFileKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
IIndexFragmentFile newFile= selectIndexFile(linkageID, topIfl, ast.getSignificantMacros());
|
IIndexFragmentFile newFile= selectIndexFile(linkageID, topIfl, significantMacros);
|
||||||
if (ctx != null) {
|
if (ctx != null) {
|
||||||
orderedFileKeys.add(new FileInAST(topKey, codeReader));
|
orderedFileKeys.add(new FileInAST(topKey, codeReader));
|
||||||
// File can be reused
|
// File can be reused
|
||||||
|
|
Loading…
Add table
Reference in a new issue