https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/96168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/96168
>From 7ac89c2758965fec2dd007954735e59d793d6a59 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 20 Jun 2024 14:07:37 +0300
Subject: [PATCH 1/4] [clang] Add test for CWG2811 "Clarify "use" of main"
--
@@ -964,7 +964,7 @@ def err_main_global_variable :
def warn_main_redefined : Warning<"variable named 'main' with external linkage
"
"has undefined behavior">, InGroup;
def ext_main_used : Extension<
- "ISO C++ does not allow 'main' to be used by a program">, InGroup;
+ "
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/96168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin approved this pull request.
LGTM if @AaronBallman is happy
("expressions that... are an extensions" still sounds weird to me, cf previous
comment)
https://github.com/llvm/llvm-project/pull/96168
___
cfe-commits mailing lis
Endilll wrote:
> do we have test that this is fine?
>
> ```
> namespace foo {
> int main();
> using a = decltype(&main);
> }```
> ```
Thank you, I added the tests.
https://github.com/llvm/llvm-project/pull/96168
___
cfe-commits mailing list
c
@@ -964,7 +964,7 @@ def err_main_global_variable :
def warn_main_redefined : Warning<"variable named 'main' with external linkage
"
"has undefined behavior">, InGroup;
def ext_main_used : Extension<
- "ISO C++ does not allow 'main' to be used by a program">, InGroup;
+ "
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/96168
>From 7ac89c2758965fec2dd007954735e59d793d6a59 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 20 Jun 2024 14:07:37 +0300
Subject: [PATCH 1/3] [clang] Add test for CWG2811 "Clarify "use" of main"
--
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/96168
>From 7ac89c2758965fec2dd007954735e59d793d6a59 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 20 Jun 2024 14:07:37 +0300
Subject: [PATCH 1/2] [clang] Add test for CWG2811 "Clarify "use" of main"
--
@@ -964,7 +964,7 @@ def err_main_global_variable :
def warn_main_redefined : Warning<"variable named 'main' with external linkage
"
"has undefined behavior">, InGroup;
def ext_main_used : Extension<
- "ISO C++ does not allow 'main' to be used by a program">, InGroup;
+ "
@@ -964,7 +964,7 @@ def err_main_global_variable :
def warn_main_redefined : Warning<"variable named 'main' with external linkage
"
"has undefined behavior">, InGroup;
def ext_main_used : Extension<
- "ISO C++ does not allow 'main' to be used by a program">, InGroup;
+ "
Endilll wrote:
> it's clearer that it's not conforming (at the very least we should say
> something like "clang extension"
As someone who was a user of Clang not so long ago, I have to say that the only
thing "ISO C++ requires" conveyed to me was "you're doing something wrong". For
me it neve
cor3ntin wrote:
I think I prefer the current wording, it's clearer that it's not conforming (at
the very least we should say something like "clang extension". and maybe
"referring to main is a clang extension".
LGTM otherwise
do we have test that this is fine?
```
namespace foo {
int main
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Vlad Serebrennikov (Endilll)
Changes
This patch covers [CWG2811](https://cplusplus.github.io/CWG/issues/2811.html)
"Clarify "use" of main", basically adding a test for `-Wmain`, focusing on
usages of `main` in unevaluated contexts.
To my
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/96168
This patch covers [CWG2811](https://cplusplus.github.io/CWG/issues/2811.html)
"Clarify "use" of main", basically adding a test for `-Wmain`, focusing on
usages of `main` in unevaluated contexts.
To my understan
15 matches
Mail list logo