Skip to content
Commit c1c72302 authored by Jan Svoboda's avatar Jan Svoboda
Browse files

[clang][deps] Prevent emitting diagnostics outside of source file

The dependency scanner needs to report the module map file describing the module whose implementation is being compiled (see D134222). However, calling `Preprocessor::getCurrentModuleImplementation()` in the scanner might cause a diagnostic during module map parsing and emitting a diagnostic without being "in" a source file is illegal (e.g. in `TextDiagnosticPrinter`). This patch ensures the module map parse is triggered while the compiler is still "in" a source file, avoiding the failure case.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D135637
parent 060b2534
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment