[clang] [C++20] [Modules] Warn if we found #include <filename> in module purview (PR #69555)

Iain Sandoe via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 19 00:33:26 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; "
----------------
iains wrote:

'appears to be erroneous' seems a bit strong (since we know there are valid cases to do this).  Maybe we can think of a way to explain the actual problem without ending up with too many words (or perhaps have a short warning message and attach a note with explanation)?

https://github.com/llvm/llvm-project/pull/69555


More information about the cfe-commits mailing list