summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling/CompilationDatabaseTest.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-01-25 20:04:44 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-01-25 20:04:44 +0000
commit8a8454bc31c91fbb6966416ca2fa6924fdfaf598 (patch)
treea0b0f57d4a2f1d7a2e51641db4cf9e419d27e739 /clang/unittests/Tooling/CompilationDatabaseTest.cpp
parentb8d499fe2ff637bf743647aadaa1016f0e5d4dde (diff)
downloadbcm5719-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.cpp2
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) {
OpenPOWER on IntegriCloud