[clang] [clang] Add test for CWG2811 "Clarify "use" of main" (PR #96168)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 05:53:14 PDT 2024
================
@@ -964,7 +964,7 @@ def err_main_global_variable :
def warn_main_redefined : Warning<"variable named 'main' with external linkage "
"has undefined behavior">, InGroup<Main>;
def ext_main_used : Extension<
- "ISO C++ does not allow 'main' to be used by a program">, InGroup<Main>;
+ "expressions that refer to 'main' are an extension">, InGroup<Main>;
----------------
cor3ntin wrote:
no, it's not. `main` is named by an expression (which is unevaluated)
https://github.com/llvm/llvm-project/pull/96168
More information about the cfe-commits
mailing list