================
@@ -1062,6 +1062,10 @@ def err_constexpr_main : Error<
"'main' is not allowed to be declared %select{constexpr|consteval}0">;
def err_deleted_main : Error<"'main' is not allowed to be deleted">;
def err_mainlike_template_decl : Error<"%0 cannot be a template">;
+def warn_main_in_named_module
+ : ExtWarn<"'main' should not be attached to a named module; consider "
+ "adding C++ language linkage">,
----------------
cor3ntin wrote:
Maybe just `'main' never has module linkage;" the "Consider..." is somewhat
redundant with the fixit
https://github.com/llvm/llvm-project/pull/146635
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits