Skip to content

[Clang] Fix failing clang-tidy test #128051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Conversation

Sirraide
Copy link
Member

#123470 broke one of the clang-tidy tests; this fixes that.

@Sirraide Sirraide merged commit 29361b3 into llvm:main Feb 20, 2025
6 of 9 checks passed
@llvmbot
Copy link
Member

llvmbot commented Feb 20, 2025

@llvm/pr-subscribers-clang-tidy

Author: None (Sirraide)

Changes

#123470 broke one of the clang-tidy tests; this fixes that.


Full diff: https://github.com/llvm/llvm-project/pull/128051.diff

1 Files Affected:

  • (modified) clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp (+2-2)
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp
index c22e9c564e3ee..50433d5d12ea9 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp
@@ -37,8 +37,8 @@ void operator delete[](void *x) throw();
 void operator delete[](void * /*x*/) throw();
 
 struct X {
-  X operator++(int) { throw 0; }
-  X operator--(int) { throw 0; }
+  void operator++(int) {}
+  void operator--(int) {}
 
   X(X&) = delete;
   X &operator=(X&) = default;

@llvmbot
Copy link
Member

llvmbot commented Feb 20, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: None (Sirraide)

Changes

#123470 broke one of the clang-tidy tests; this fixes that.


Full diff: https://github.com/llvm/llvm-project/pull/128051.diff

1 Files Affected:

  • (modified) clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp (+2-2)
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp
index c22e9c564e3ee..50433d5d12ea9 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/named-parameter.cpp
@@ -37,8 +37,8 @@ void operator delete[](void *x) throw();
 void operator delete[](void * /*x*/) throw();
 
 struct X {
-  X operator++(int) { throw 0; }
-  X operator--(int) { throw 0; }
+  void operator++(int) {}
+  void operator--(int) {}
 
   X(X&) = delete;
   X &operator=(X&) = default;

@Sirraide Sirraide deleted the wreturn-type-3 branch February 20, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants