r202684 - MSVC 2012 doesn't support std::initializer_list at all, so don't rely on

Peter Collingbourne peter at pcc.me.uk
Mon Mar 3 00:13:07 PST 2014


Author: pcc
Date: Mon Mar  3 02:13:06 2014
New Revision: 202684

URL: http://llvm.org/viewvc/llvm-project?rev=202684&view=rev
Log:
MSVC 2012 doesn't support std::initializer_list at all, so don't rely on
that std::vector constructor.

Modified:
    cfe/trunk/unittests/Tooling/ToolingTest.cpp

Modified: cfe/trunk/unittests/Tooling/ToolingTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/ToolingTest.cpp?rev=202684&r1=202683&r2=202684&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/ToolingTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/ToolingTest.cpp Mon Mar  3 02:13:06 2014
@@ -240,8 +240,12 @@ TEST(runToolOnCodeWithArgs, TestNoDepFil
   llvm::SmallString<32> DepFilePath;
   ASSERT_FALSE(
       llvm::sys::fs::createTemporaryFile("depfile", "d", DepFilePath));
-  std::vector<std::string> Args = { "-MMD", "-MT", DepFilePath.str(), "-MF",
-                                    DepFilePath.str() };
+  std::vector<std::string> 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()));





More information about the cfe-commits mailing list