Skip to content

Conversation

@jansvoboda11
Copy link

After llvm#70144 Clang started resolving module maps even for __has_include() expressions. This had the unintended consequence of emitting diagnostics around header misuse. These don't make sense if you actually don't bring contents of the header into the importer, so should be skipped for __has_include(). This patch moves emission of these diagnostics out of Preprocessor::LookupFile() up into Preprocessor::LookupHeaderIncludeOrImport().

(cherry picked from commit bdb309c)

…m#71450)

After llvm#70144 Clang started resolving module maps even for
`__has_include()` expressions. This had the unintended consequence of
emitting diagnostics around header misuse. These don't make sense if you
actually don't bring contents of the header into the importer, so should
be skipped for `__has_include()`. This patch moves emission of these
diagnostics out of `Preprocessor::LookupFile()` up into
`Preprocessor::LookupHeaderIncludeOrImport()`.

(cherry picked from commit bdb309c)
@jansvoboda11
Copy link
Author

@swift-ci please test

@jansvoboda11
Copy link
Author

@swift-ci please test Windows platform

@jansvoboda11
Copy link
Author

Merging is blocked due to Windows failure tracked here: swiftlang/swift#69687

@kubamracek
Copy link

@swift-ci please test Windows platform

@jansvoboda11 jansvoboda11 merged commit cd01bae into stable/20230725 Nov 7, 2023
@jansvoboda11 jansvoboda11 deleted the jan_svoboda/20230725-has-include-fix-2 branch November 7, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants