[llvm] 8b4d4be - [NFC][ADT] Remove << operators from StringRefTest (#105500)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 11:38:16 PDT 2024


Author: Rahul Joshi
Date: 2024-08-21T11:38:13-07:00
New Revision: 8b4d4bee2a45f637fb4dcda49b592374e93a6480

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

LOG: [NFC][ADT] Remove << operators from StringRefTest (#105500)

- Remove ostream << operators for StringRef and StringRef pair from
StringTest.
  Both of these are natively supported by googletest framework.

Added: 
    

Modified: 
    llvm/unittests/ADT/StringRefTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ADT/StringRefTest.cpp b/llvm/unittests/ADT/StringRefTest.cpp
index 40351c99d0185c..a0529b03ae8c22 100644
--- a/llvm/unittests/ADT/StringRefTest.cpp
+++ b/llvm/unittests/ADT/StringRefTest.cpp
@@ -16,21 +16,6 @@
 #include "gtest/gtest.h"
 using namespace llvm;
 
-namespace llvm {
-
-std::ostream &operator<<(std::ostream &OS, const StringRef &S) {
-  OS << S.str();
-  return OS;
-}
-
-std::ostream &operator<<(std::ostream &OS,
-                         const std::pair<StringRef, StringRef> &P) {
-  OS << "(" << P.first << ", " << P.second << ")";
-  return OS;
-}
-
-}
-
 // Check that we can't accidentally assign a temporary std::string to a
 // StringRef. (Unfortunately we can't make use of the same thing with
 // constructors.)


        


More information about the llvm-commits mailing list