https://github.com/11happy created
https://github.com/llvm/llvm-project/pull/77586
**Overview:**
This pull request fixes #38469 where the issue proposes a new static analysis
check in C++ to discourage the explicit return 0; statement at the end of the
main() function. As C++ automatically ass
llvmbot wrote:
@llvm/pr-subscribers-clang-tidy
Author: Bhuminjay Soni (11happy)
Changes
**Overview:**
This pull request fixes #38469 where the issue proposes a new static
analysis check in C++ to discourage the explicit return 0; statement at the end
of the main() function. As C++ automa
https://github.com/11happy updated
https://github.com/llvm/llvm-project/pull/77586
>From bae95013cd7f937a5496cafcd40a77cc563addb0 Mon Sep 17 00:00:00 2001
From: 11happy
Date: Wed, 10 Jan 2024 16:48:43 +0530
Subject: [PATCH 1/2] Added check for redundant return statement
Signed-off-by: 11happy
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 8f78dd4b92b44c490d263a4d161850853874859d
bae95013cd7f937a5496cafcd40a77cc563addb0 --
@@ -0,0 +1,30 @@
+//===--- DonotreturnzerocheckCheck.h - clang-tidy ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,50 @@
+//===--- DonotreturnzerocheckCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,50 @@
+//===--- DonotreturnzerocheckCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,50 @@
+//===--- DonotreturnzerocheckCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/PiotrZSL requested changes to this pull request.
I'm not fan about this check. For me there is no use case for it.
For sure it's not readability, simply because explicit return is more readable,
and people who do not know that main by default will return 0 may even consider
t
11happy wrote:
> I'm not fan about this check. For me there is no use case for it. For sure
> it's not readability, simply because explicit return is more readable, and
> people who do not know that main by default will return 0 may even consider
> this check a bug, as why all functions got re
AaronBallman wrote:
> I'm not fan about this check. For me there is no use case for it.
Yeah, I don't see much motivation for the check. I know that once upon a time
(my grey beard is showing, lol) there were compiler bugs in some
implementations where a missing return statement in `main` woul
https://github.com/11happy updated
https://github.com/llvm/llvm-project/pull/77586
>From bae95013cd7f937a5496cafcd40a77cc563addb0 Mon Sep 17 00:00:00 2001
From: 11happy
Date: Wed, 10 Jan 2024 16:48:43 +0530
Subject: [PATCH 1/5] Added check for redundant return statement
Signed-off-by: 11happy
https://github.com/11happy updated
https://github.com/llvm/llvm-project/pull/77586
>From bae95013cd7f937a5496cafcd40a77cc563addb0 Mon Sep 17 00:00:00 2001
From: 11happy
Date: Wed, 10 Jan 2024 16:48:43 +0530
Subject: [PATCH 1/6] Added check for redundant return statement
Signed-off-by: 11happy
11happy wrote:
@PiotrZSL I have updated the code as per your suggestions. Can you please take
a look at it?
Thank you.
https://github.com/llvm/llvm-project/pull/77586
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
carlosgalvezp wrote:
I agree with the opinions from Aaron And Piotr above - this check does the
opposite of readability: it forces people to waste time digging into the
Standard to find the quote that says the return is not needed.
Could some argumentation be provided as to why this would be
EugeneZelenko wrote:
Original issue was closed as `wontfix`.
https://github.com/llvm/llvm-project/pull/77586
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL closed
https://github.com/llvm/llvm-project/pull/77586
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
PiotrZSL wrote:
I'm closing this pull request, as both Carlos and Aaron already commented,
closed also issue.
Please find some other issue to implement, if you got questions, you can always
ask in issue, or on discord.
This check won't be merged, simply it's as Carols described
"nano-optimizat
11happy wrote:
> I agree with the opinions from Aaron And Piotr above - this check does the
> opposite of readability: it forces people to waste time digging into the
> Standard to find the quote that says the return is not needed.
>
> Could some argumentation be provided as to why this would
EugeneZelenko wrote:
@11happy: There are plenty of Clang-tidy issues with such tag:
https://github.com/llvm/llvm-project/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aclang-tidy
https://github.com/llvm/llvm-project/pull/77586
__
PiotrZSL wrote:
There are ~600 other issues, not all were fully "reviewed", and there are many
easy ones that aren't mark "good first issue". Once you pick something else, I
will be happy to help with the review.
https://github.com/llvm/llvm-project/pull/77586
_
11happy wrote:
Sure Sure, I will take up another issue.
https://github.com/llvm/llvm-project/pull/77586
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
Thanks for understanding @11happy ! As you say the learning experience is
invaluable and will be very useful for the next check. All contributions are
greatly appreciated :)
I can recommend you look into fairly recent issues - older issues may not have
been reviewed throu
23 matches
Mail list logo