[all-commits] [llvm/llvm-project] bdb309: [clang][modules] Avoid modules diagnostics for `__...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Mon Nov 6 17:31:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bdb309c5fd4030ae6ff9d5114e3532d45a98a183
https://github.com/llvm/llvm-project/commit/bdb309c5fd4030ae6ff9d5114e3532d45a98a183
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-11-06 (Mon, 06 Nov 2023)
Changed paths:
M clang/lib/Lex/PPDirectives.cpp
A clang/test/Modules/has_include_non_modular.c
Log Message:
-----------
[clang][modules] Avoid modules diagnostics for `__has_include()` (#71450)
After #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()`.
More information about the All-commits
mailing list