forked from qt-creator/qt-creator
Clang: Add ostream for clang::StringRef
Change-Id: Ibafb1c179fcc49f1df330537ad6dc9addba5618d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user