From: Aaron Ballman Date: Tue, 26 Aug 2014 14:17:25 +0000 (+0000) Subject: Some versions of MSVC do not support initializer list construction of vectors, so... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26380cd51f4d656c7c68768086876b734e62bf2a;p=clang Some versions of MSVC do not support initializer list construction of vectors, so this fixes a broken build from r216385. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216457 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/AST/ASTVectorTest.cpp b/unittests/AST/ASTVectorTest.cpp index 3a8e8e89b6..23c52be5b1 100644 --- a/unittests/AST/ASTVectorTest.cpp +++ b/unittests/AST/ASTVectorTest.cpp @@ -72,7 +72,8 @@ TEST_F(ASTVectorTest, InsertEmpty) { ASTVector V; // Ensure no pointer overflow when inserting empty range - std::vector IntVec{0, 1, 2, 3}; + int Values[] = { 0, 1, 2, 3 }; + std::vector IntVec(Values, Values + 4); auto I = V.insert(Ctxt, V.begin(), IntVec.begin(), IntVec.begin()); ASSERT_EQ(V.begin(), I); ASSERT_TRUE(V.empty());