Fix oversight in recent cleanup. We should filter discovered headers whenever
dotd file scanning is not used so that we can properly warn on undeclared
inclusions.
RELNOTES: None.
@@ -566,7 +566,7 @@ public class CppCompileAction extends AbstractAction implements IncludeScannable
.setCmdlineIncludes(getCmdlineIncludes(options))
.build());
- if (useHeaderModules) {
+ if (getDotdFile() == null) {
// If we aren't looking at .d files later, remove undeclared inputs now.
additionalInputs =
filterDiscoveredHeaders(actionExecutionContext, additionalInputs, headerInfo);
