]> granicus.if.org Git - clang/commitdiff
Some versions of MSVC do not support initializer list construction of vectors, so...
authorAaron Ballman <aaron@aaronballman.com>
Tue, 26 Aug 2014 14:17:25 +0000 (14:17 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 26 Aug 2014 14:17:25 +0000 (14:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216457 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/AST/ASTVectorTest.cpp

index 3a8e8e89b6e1e0aa95eff955aca956bc1c1066a9..23c52be5b123746eb5f15f341a9e488a0c8602db 100644 (file)
@@ -72,7 +72,8 @@ TEST_F(ASTVectorTest, InsertEmpty) {
   ASTVector<double> V;
 
   // Ensure no pointer overflow when inserting empty range
-  std::vector<int> IntVec{0, 1, 2, 3};
+  int Values[] = { 0, 1, 2, 3 };
+  std::vector<int> IntVec(Values, Values + 4);
   auto I = V.insert(Ctxt, V.begin(), IntVec.begin(), IntVec.begin());
   ASSERT_EQ(V.begin(), I);
   ASSERT_TRUE(V.empty());