-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[Clang][NFC] use const references for function parameters in operator== and operator!= overloads in Redeclarable.h #92963
Conversation
@llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) ChangesFixes #92755 Full diff: https://github.com/llvm/llvm-project/pull/92963.diff 1 Files Affected:
diff --git a/clang/include/clang/AST/Redeclarable.h b/clang/include/clang/AST/Redeclarable.h
index 091bb886f2d49..74ccd74ed60d6 100644
--- a/clang/include/clang/AST/Redeclarable.h
+++ b/clang/include/clang/AST/Redeclarable.h
@@ -281,10 +281,10 @@ class Redeclarable {
return tmp;
}
- friend bool operator==(redecl_iterator x, redecl_iterator y) {
+ friend bool operator==(const redecl_iterator &x, const redecl_iterator &y) {
return x.Current == y.Current;
}
- friend bool operator!=(redecl_iterator x, redecl_iterator y) {
+ friend bool operator!=(const redecl_iterator &x, const redecl_iterator &y) {
return x.Current != y.Current;
}
};
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explicitly say NFC in the commit title. Otherwise, LGTM
…== and operator!= overloads in Redeclarable.h
@zyn0217 Thanks. I've added [NCF] to the commit/title. |
No problem! Do you need anyone else to help you commit it? |
@zyn0217 Yes, I do. I don't have access to merge… |
@zyn0217 Thanks |
…== and operator!= overloads in Redeclarable.h (llvm#92963) Fixes llvm#92755
…== and operator!= overloads in Redeclarable.h (llvm#92963) Fixes llvm#92755
Fixes #92755