rsmith added inline comments.
================ Comment at: include/clang/Lex/PPCallbacks.h:263 + /// \brief Callback invoked when a has_include directive is read. + virtual void HasInclude(SourceLocation Loc, const FileEntry *File) { + } ---------------- This callback seems pretty unhelpful in the case where lookup of the file failed (you just get a source location). Could we pass in the `FileName` and `IsAngled` flag too (like we do for `InclusionDirective`)? I think that's what (eg) a callback tracking anti-dependencies (for a more sophisticated build system that can handle them) would want. ================ Comment at: lib/Frontend/DependencyFile.cpp:325 +void DFGImpl::HasInclude(SourceLocation Loc, const FileEntry *File) { + if (!File) + return; ---------------- Have you thought about whether we should add a dependency even for a missing file under `-MG` (`AddMissingHeaderDeps`) mode? I think it's probably better to not do so (ie, the behavior in this patch), but it seems worth considering. https://reviews.llvm.org/D30882 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits