forked from OSchip/llvm-project
Move the two definitions of operator<< into namespace llvm, so they
will be found by argument-dependent lookup. As with the previous commit, GCC is allowing ill-formed code. llvm-svn: 92146
This commit is contained in:
parent
bfb3671b25
commit
4ee2cf658c
|
@ -13,7 +13,7 @@
|
|||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
namespace llvm {
|
||||
|
||||
std::ostream &operator<<(std::ostream &OS, const StringRef &S) {
|
||||
OS << S;
|
||||
|
@ -26,6 +26,9 @@ std::ostream &operator<<(std::ostream &OS,
|
|||
return OS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace {
|
||||
TEST(StringRefTest, Construction) {
|
||||
EXPECT_EQ("", StringRef());
|
||||
EXPECT_EQ("hello", StringRef("hello"));
|
||||
|
|
Loading…
Reference in New Issue