From f93725459a0b2e8d7b056a545d245d029d93c6cd Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 3 Mar 2014 08:13:06 +0000 Subject: MSVC 2012 doesn't support std::initializer_list at all, so don't rely on that std::vector constructor. llvm-svn: 202684 --- clang/unittests/Tooling/ToolingTest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'clang/unittests/Tooling/ToolingTest.cpp') diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp index a9c8f90f14c..302616b8426 100644 --- a/clang/unittests/Tooling/ToolingTest.cpp +++ b/clang/unittests/Tooling/ToolingTest.cpp @@ -240,8 +240,12 @@ TEST(runToolOnCodeWithArgs, TestNoDepFile) { llvm::SmallString<32> DepFilePath; ASSERT_FALSE( llvm::sys::fs::createTemporaryFile("depfile", "d", DepFilePath)); - std::vector Args = { "-MMD", "-MT", DepFilePath.str(), "-MF", - DepFilePath.str() }; + std::vector Args; + Args.push_back("-MMD"); + Args.push_back("-MT"); + Args.push_back(DepFilePath.str()); + Args.push_back("-MF"); + Args.push_back(DepFilePath.str()); EXPECT_TRUE(runToolOnCodeWithArgs(new SkipBodyAction, "", Args)); EXPECT_FALSE(llvm::sys::fs::exists(DepFilePath.str())); EXPECT_FALSE(llvm::sys::fs::remove(DepFilePath.str())); -- cgit v1.2.3