diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java index d4c703db020..ca2ca475017 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java @@ -25,6 +25,7 @@ import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.index.IIndexFile; import org.eclipse.cdt.core.index.IIndexFileLocation; +import org.eclipse.cdt.core.index.IIndexInclude; import org.eclipse.cdt.core.index.IIndexLocationConverter; import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.parser.ISignificantMacros; @@ -171,6 +172,12 @@ public class WritablePDOM extends PDOM implements IWritableIndexFragment { IIndexFileLocation location = file.getLocation(); PDOMFile pdomFile = (PDOMFile) file; pdomFile.clear(); + IIndexInclude include = pdomFile.getParsedInContext(); + if (include != null) { + PDOMFile includedBy = (PDOMFile) include.getIncludedBy(); + if (includedBy.getTimestamp() > 0) + getIndexOfFilesWithUnresolvedIncludes().insert(includedBy.getRecord()); + } fEvent.fClearedFiles.add(location); }