diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-01-25 20:04:44 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-01-25 20:04:44 +0000 |
| commit | 8a8454bc31c91fbb6966416ca2fa6924fdfaf598 (patch) | |
| tree | a0b0f57d4a2f1d7a2e51641db4cf9e419d27e739 /clang/unittests/Tooling/CompilationDatabaseTest.cpp | |
| parent | b8d499fe2ff637bf743647aadaa1016f0e5d4dde (diff) | |
| download | bcm5719-llvm-8a8454bc31c91fbb6966416ca2fa6924fdfaf598.tar.gz bcm5719-llvm-8a8454bc31c91fbb6966416ca2fa6924fdfaf598.zip | |
unittests: explicit stringify StringRefs for conversion
When clang is built outside of the LLVM tree (against a corresponding version),
there is no definition providing for operator<<(std::ostream &, StringRef) which
is required for the assertion routines in google-test tests. Avoid the
compilation failure by explicitly stringifying the StringRef prior to use.
llvm-svn: 200096
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
| -rw-r--r-- | clang/unittests/Tooling/CompilationDatabaseTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp index c575dff209a..4920d6d66bb 100644 --- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp +++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp @@ -24,7 +24,7 @@ static void expectFailure(StringRef JSONDatabase, StringRef Explanation) { std::string ErrorMessage; EXPECT_EQ(NULL, JSONCompilationDatabase::loadFromBuffer(JSONDatabase, ErrorMessage)) - << "Expected an error because of: " << Explanation; + << "Expected an error because of: " << Explanation.str(); } TEST(JSONCompilationDatabase, ErrsOnInvalidFormat) { |

