[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 4 15:31:37 PST 2024
================
@@ -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&) {
----------------
Da-Viper wrote:
Yeah the std:: common_iterator::iter_move
But the check checks only if the function name is iter_move then performs the check.
If you do prefer I could change it to only one arg
https://github.com/llvm/llvm-project/pull/76117
More information about the cfe-commits
mailing list