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

Bug 450888. Fixed inconsistent handling of significant macros.

This commit is contained in:
Sergey Prigogin 2014-11-29 16:27:49 -08:00
parent 0460895b24
commit 04042aeeb9

View file

@ -1248,7 +1248,9 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
ArrayList<FileInAST> orderedFileKeys= new ArrayList<>();
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);
IDependencyTree tree= ast.getDependencyTree();
IASTInclusionNode[] inclusions= tree.getInclusions();
@ -1256,7 +1258,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
collectOrderedFileKeys(linkageID, inclusion, enteredFiles, orderedFileKeys);
}
IIndexFragmentFile newFile= selectIndexFile(linkageID, topIfl, ast.getSignificantMacros());
IIndexFragmentFile newFile= selectIndexFile(linkageID, topIfl, significantMacros);
if (ctx != null) {
orderedFileKeys.add(new FileInAST(topKey, codeReader));
// File can be reused