https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,67 @@
+//===--- ExceptionRethrowCheck.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,67 @@
+//===--- ExceptionRethrowCheck.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,67 @@
+//===--- ExceptionRethrowCheck.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,84 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,67 @@
+//===--- ExceptionRethrowCheck.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,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,68 @@
+//===--- ExceptionRethrowCheck.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 updated
https://github.com/llvm/llvm-project/pull/86448
>From 8ed57a657d9b87bfaaa5c4394fc3fcaf670ba94c Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/7] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,68 @@
+//===--- ExceptionRethrowCheck.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,68 @@
+//===--- ExceptionRethrowCheck.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,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
+ template
+ T&& move(T &&x) {
+return static_cast(x);
+ }
+}
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const
@@ -0,0 +1,68 @@
+//===--- ExceptionRethrowCheck.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,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,68 @@
+//===--- ExceptionRethrowCheck.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,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
+ template
+ T&& move(T &&x) {
+return static_cast(x);
+ }
+}
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const
https://github.com/isuckatcs requested changes to this pull request.
Apart from some docs changes and the lambda false positive, the check looks
good.
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.
@@ -0,0 +1,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,83 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,68 @@
+//===--- ExceptionRethrowCheck.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/isuckatcs edited
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 8ed57a657d9b87bfaaa5c4394fc3fcaf670ba94c Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/6] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
PiotrZSL wrote:
that's a job for separate change, as std::move is duplicated in multiple test
files.
https://github.com/l
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From c99ba980b0b242fced57fb323c5069d856c68810 Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 31 Mar 2024 12:16:53 +
Subject: [PATCH 1/6] fix
---
clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 01/10] [clang-tidy] Added bugprone-exception-rethrow check
Identif
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/9] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/8] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/7] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/5] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/6] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
+ template
+ T&& move(T &x) {
+return static_cast(x);
+ }
+}
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
isuckatcs wrote:
For the static analyzer we have `system-header-simulator-cxx.h`, maybe
clang-tidy would also benefit from
https://github.com/isuckatcs edited
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
https://github.com/isuckatcs requested changes to this pull request.
Apart from a few typos in the docs and the lambda case, the patch looks good to
me.
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llv
@@ -0,0 +1,103 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+namespace std {
+ template
+ T&& move(T &x) {
isuckatcs wrote:
```suggestion
T&& move(T &&x) {
```
The official signature is the one b
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
@@ -0,0 +1,67 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/4] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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,37 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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,60 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const exception &) {
+ throw;
+ }
+}
+
+void correct2() {
+ try {
+ throw exception
https://github.com/HerrCai0907 approved this pull request.
LGTM in code. I am not a native English speaker so I can't review the
documentation very well.
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.ll
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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,68 @@
+.. title:: clang-tidy - bugprone-exception-rethrow
+
+bugprone-exception-rethrow
+==
+
+Identifies problematic exception rethrowing, especially with caught exception
+variables or empty throw statements outside catch blocks.
+
+In C++ exce
PiotrZSL wrote:
> By the way, looking at the issue, it seems like someone claimed to be working
> on it, though we haven't seen any progress so far. Was it okay to take over
> before asking that person first?
No pull request, no branch, no update for almost 3 months.
I assumed that it's abando
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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,60 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const exception &) {
+ throw;
+ }
+}
+
+void correct2() {
+ try {
+ throw exception
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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,60 @@
+// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions
+
+struct exception {};
+
+void correct() {
+ try {
+ throw exception();
+ } catch(const exception &) {
+ throw;
+ }
+}
+
+void correct2() {
+ try {
+ throw exception
@@ -0,0 +1,50 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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 @@
+//===--- ExceptionRethrowCheck.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/isuckatcs requested changes to this pull request.
Overall the patch looks good apart from some typos and documentation.
By the way, looking at the issue, it seems like someone claimed to be working
on it, though we haven't seen any progress so far. Was it okay to take over
b
@@ -0,0 +1,37 @@
+//===--- ExceptionRethrowCheck.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
https://github.com/isuckatcs edited
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
github-actions[bot] wrote:
:white_check_mark: With the latest revision this PR passed the C/C++ code
formatter.
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
github-actions[bot] wrote:
:white_check_mark: With the latest revision this PR passed the Python code
formatter.
https://github.com/llvm/llvm-project/pull/86448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/86448
>From 05cf976fd14e3d2a7e716e26e80e8958dff4222c Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 24 Mar 2024 18:39:54 +
Subject: [PATCH 1/2] [clang-tidy] Added bugprone-exception-rethrow check
Identifie
llvmbot wrote:
@llvm/pr-subscribers-clang-tools-extra
@llvm/pr-subscribers-clang-tidy
Author: Piotr Zegar (PiotrZSL)
Changes
Identifies problematic exception rethrowing, especially with caught exception
variables or empty throw statements outside catch blocks.
Closes #71292
---
Full dif
https://github.com/PiotrZSL created
https://github.com/llvm/llvm-project/pull/86448
Identifies problematic exception rethrowing, especially with caught exception
variables or empty throw statements outside catch blocks.
Closes #71292
>From 05cf976fd14e3d2a7e716e26e80e8958dff4222c Mon Sep 17 0
76 matches
Mail list logo