diff options
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
-rw-r--r-- | clang/unittests/Tooling/CompilationDatabaseTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp index 56ebadc..cc948b8 100644 --- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp +++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp @@ -87,11 +87,11 @@ TEST(JSONCompilationDatabase, GetAllFiles) { std::vector<std::string> expected_files; SmallString<16> PathStorage; llvm::sys::path::native("//net/dir/file1", PathStorage); - expected_files.push_back(PathStorage.str()); + expected_files.push_back(std::string(PathStorage.str())); llvm::sys::path::native("//net/dir/file2", PathStorage); - expected_files.push_back(PathStorage.str()); + expected_files.push_back(std::string(PathStorage.str())); llvm::sys::path::native("//net/file1", PathStorage); - expected_files.push_back(PathStorage.str()); + expected_files.push_back(std::string(PathStorage.str())); EXPECT_EQ(expected_files, getAllFiles("[{\"directory\":\"//net/dir\"," "\"command\":\"command\"," @@ -654,7 +654,7 @@ struct MemCDB : public CompilationDatabase { std::vector<std::string> getAllFiles() const override { std::vector<std::string> Result; for (const auto &Entry : Entries) - Result.push_back(Entry.first()); + Result.push_back(std::string(Entry.first())); return Result; } }; @@ -682,7 +682,7 @@ protected: llvm::sys::path::native(File); llvm::SmallString<64> Result; llvm::sys::path::append(Result, Dir, File); - return Result.str(); + return std::string(Result.str()); } MemCDB::EntryMap Entries; @@ -723,7 +723,7 @@ protected: Proxy.consume_front(llvm::sys::path::get_separator()); llvm::SmallString<32> Result = Proxy; llvm::sys::path::native(Result, llvm::sys::path::Style::posix); - return Result.str(); + return std::string(Result.str()); } }; |