https://github.com/PiotrZSL approved this pull request.
https://github.com/llvm/llvm-project/pull/76117
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Da-Viper updated
https://github.com/llvm/llvm-project/pull/76117
>From 97eeda4684804229d9faad19ea7b7888dcd91786 Mon Sep 17 00:00:00 2001
From: Ezike Ebuka
Date: Thu, 21 Dec 2023 02:30:34 +
Subject: [PATCH 1/6] Fix #75686: add iter_swap and iter_move to the matched
name
@@ -586,6 +586,16 @@ void swap(int&, int&) {
throw 1;
}
+void iter_swap(int&, int&) {
+ // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in
function 'iter_swap' which should not throw exceptions
+ throw 1;
+}
+
+void iter_move(int&, int&) {
@@ -586,6 +586,16 @@ void swap(int&, int&) {
throw 1;
}
+void iter_swap(int&, int&) {
+ // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in
function 'iter_swap' which should not throw exceptions
+ throw 1;
+}
+
+void iter_move(int&, int&) {
@@ -58,14 +58,15 @@ void
ExceptionEscapeCheck::storeOptions(ClangTidyOptions::OptionMap ) {
void ExceptionEscapeCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
- functionDecl(isDefinition(),
- anyOf(isNoThrow(),
-
@@ -586,6 +586,16 @@ void swap(int&, int&) {
throw 1;
}
+void iter_swap(int&, int&) {
+ // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in
function 'iter_swap' which should not throw exceptions
+ throw 1;
+}
+
+void iter_move(int&, int&) {
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/76117
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
LGTM.
Looks fine even in current stage.
https://github.com/llvm/llvm-project/pull/76117
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/Da-Viper updated
https://github.com/llvm/llvm-project/pull/76117
>From 97eeda4684804229d9faad19ea7b7888dcd91786 Mon Sep 17 00:00:00 2001
From: Ezike Ebuka
Date: Thu, 21 Dec 2023 02:30:34 +
Subject: [PATCH 1/2] Fix #75686: add iter_swap and iter_move to the matched
name
https://github.com/PiotrZSL requested changes to this pull request.
Missing tests, documentation, release notes.
https://github.com/llvm/llvm-project/pull/76117
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
EugeneZelenko wrote:
Should Release Notes be updated?
https://github.com/llvm/llvm-project/pull/76117
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-tidy
Author: None (Da-Viper)
Changes
Fixes #75686
---
Full diff: https://github.com/llvm/llvm-project/pull/76117.diff
1 Files Affected:
- (modified) clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
(+9-8)
``diff
diff
https://github.com/Da-Viper created
https://github.com/llvm/llvm-project/pull/76117
Fixes #75686
>From 97eeda4684804229d9faad19ea7b7888dcd91786 Mon Sep 17 00:00:00 2001
From: Ezike Ebuka
Date: Thu, 21 Dec 2023 02:30:34 +
Subject: [PATCH] Fix #75686: add iter_swap and iter_move to the
13 matches
Mail list logo