Move the two definitions of operator<< into namespace llvm, so they
authorDouglas Gregor <dgregor@apple.com>
Thu, 24 Dec 2009 21:15:37 +0000 (21:15 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 24 Dec 2009 21:15:37 +0000 (21:15 +0000)
will be found by argument-dependent lookup. As with the previous
commit, GCC is allowing ill-formed code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92146 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/StringRefTest.cpp

index 19665df88d54eb9d1e67ec85b439da7f3cbf2fc9..6507c20b2b1fbfbd5eb19d226e847dbef1012bf4 100644 (file)
@@ -13,7 +13,7 @@
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
-namespace {
+namespace llvm {
 
 std::ostream &operator<<(std::ostream &OS, const StringRef &S) {
   OS << S;
 
 std::ostream &operator<<(std::ostream &OS, const StringRef &S) {
   OS << S;
@@ -26,6 +26,9 @@ std::ostream &operator<<(std::ostream &OS,
   return OS;
 }
 
   return OS;
 }
 
+}
+
+namespace {
 TEST(StringRefTest, Construction) {
   EXPECT_EQ("", StringRef());
   EXPECT_EQ("hello", StringRef("hello"));
 TEST(StringRefTest, Construction) {
   EXPECT_EQ("", StringRef());
   EXPECT_EQ("hello", StringRef("hello"));