[all-commits] [llvm/llvm-project] 0d2143: [C++20] [Modules] Warn if we found #include <filen...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Thu Nov 2 01:40:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d2143611425081bb9db5bb6ee57aaddfd1eda53
https://github.com/llvm/llvm-project/commit/0d2143611425081bb9db5bb6ee57aaddfd1eda53
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2023-11-02 (Thu, 02 Nov 2023)
Changed paths:
M clang/include/clang/Basic/DiagnosticLexKinds.td
M clang/lib/Lex/PPDirectives.cpp
A clang/test/Preprocessor/include-in-module-purview.cppm
Log Message:
-----------
[C++20] [Modules] Warn if we found #include <filename> in module purview (#69555)
Close https://github.com/llvm/llvm-project/issues/68615.
It is generally wrong to include <filename> in the module purview.
Although there are cases to include files in the module purview,
generally these use cases should include files by quotes instead of by
angles. Here we think the files got included by angles are the system
headers.
This is consistency with MSVC too:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warnings-by-compiler-version?view=msvc-170#warnings-introduced-in-visual-studio-2022-version-170-compiler-version-1930
More information about the All-commits
mailing list