[clang] b48623c - [Clang][NFC] use const references for function parameters in operator== and operator!= overloads in Redeclarable.h (#92963)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 2 06:34:10 PDT 2024


Author: Oleksandr T
Date: 2024-07-02T21:34:07+08:00
New Revision: b48623c23ae16a424102cc47ad173099bb45a695

URL: https://github.com/llvm/llvm-project/commit/b48623c23ae16a424102cc47ad173099bb45a695
DIFF: https://github.com/llvm/llvm-project/commit/b48623c23ae16a424102cc47ad173099bb45a695.diff

LOG: [Clang][NFC] use const references for function parameters in operator== and operator!= overloads in Redeclarable.h (#92963)

Fixes #92755

Added: 
    

Modified: 
    clang/include/clang/AST/Redeclarable.h

Removed: 
    


################################################################################
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;
     }
   };


        


More information about the cfe-commits mailing list