From: Peter Collingbourne Date: Mon, 3 Mar 2014 07:49:35 +0000 (+0000) Subject: MSVC cannot understand temporaries formed from initializer lists. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe52454d1c9a93e746b10ab01bb996652d9cffb3;p=clang MSVC cannot understand temporaries formed from initializer lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202682 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Tooling/ToolingTest.cpp b/unittests/Tooling/ToolingTest.cpp index f34fab0fc7..a9c8f90f14 100644 --- a/unittests/Tooling/ToolingTest.cpp +++ b/unittests/Tooling/ToolingTest.cpp @@ -240,9 +240,9 @@ TEST(runToolOnCodeWithArgs, TestNoDepFile) { llvm::SmallString<32> DepFilePath; ASSERT_FALSE( llvm::sys::fs::createTemporaryFile("depfile", "d", DepFilePath)); - EXPECT_TRUE(runToolOnCodeWithArgs( - new SkipBodyAction, "", - { "-MMD", "-MT", DepFilePath.str(), "-MF", DepFilePath.str() })); + std::vector Args = { "-MMD", "-MT", DepFilePath.str(), "-MF", + DepFilePath.str() }; + EXPECT_TRUE(runToolOnCodeWithArgs(new SkipBodyAction, "", Args)); EXPECT_FALSE(llvm::sys::fs::exists(DepFilePath.str())); EXPECT_FALSE(llvm::sys::fs::remove(DepFilePath.str())); }