[clang] [C++20] [Modules] Warn if we found #include <filename> in module purview (PR #69555)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 19 00:41:44 PDT 2023
================
@@ -922,6 +922,10 @@ def err_header_import_semi_in_macro : Error<
def err_header_import_not_header_unit : Error<
"header file %0 (aka '%1') cannot be imported because "
"it is not known to be a header unit">;
+def warn_pp_include_angled_in_module_purview : Warning<
+ "'#include <filename>' in the module purview appears to be erroneous; "
----------------
ChuanqiXu9 wrote:
My thoughts are that all the known valid use cases should use the form `#include "filename"` instead of `#include <filename>`. The angle or the quote matters here. I think it may be a general sense that the headers in the `<>` should be a system header and other things should be put in quotes `""` (I know this is not strictly true). How do you think about this?
https://github.com/llvm/llvm-project/pull/69555
More information about the cfe-commits
mailing list