Commit Graph

1 Commits

Author SHA1 Message Date
Doug Gregor
e40a275e05 [Clang importer] Ensure that we check a bridging PCH in a source file context.
When checking whether we can load a bridging precompiled header (PCH), we end
up parsing module maps. If Clang emits a warning or error while parsing the
module maps we encounter, the Swift compiler would crash because we have not
properly established the invariants of Clang's diagnostic engine. Perform a
pairsed set of BeginSourceFile/EndSourceFile calls on the Clang diagnostic
consumer to set up the appropriate state.

Fixes rdar://problem/57626886.
2019-12-13 11:09:00 -08:00