Clang: Add ostream for clang::StringRef

Change-Id: Ibafb1c179fcc49f1df330537ad6dc9addba5618d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2016-10-12 14:14:04 +02:00
parent ea44a2ce4e
commit aa97e29920

View File

@@ -69,6 +69,14 @@ QT_END_NAMESPACE
#ifdef CLANG_UNIT_TESTS
namespace clang {
inline
std::ostream &operator<<(std::ostream &out, const StringRef stringReference)
{
out.write(stringReference.data(), std::streamsize(stringReference.size()));
return out;
}
inline void PrintTo(const clang::FullSourceLoc &sourceLocation, ::std::ostream *os)
{
auto &&sourceManager = sourceLocation.getManager();