On Tue, Aug 26, 2014 at 1:11 PM, David Blaikie <[email protected]> wrote:
> On Tue, Aug 26, 2014 at 7:17 AM, Aaron Ballman <[email protected]> wrote:
>> Author: aaronballman
>> Date: Tue Aug 26 09:17:25 2014
>> New Revision: 216457
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=216457&view=rev
>> Log:
>> Some versions of MSVC do not support initializer list construction of 
>> vectors, so this fixes a broken build from r216385.
>>
>> Modified:
>>     cfe/trunk/unittests/AST/ASTVectorTest.cpp
>>
>> Modified: cfe/trunk/unittests/AST/ASTVectorTest.cpp
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/ASTVectorTest.cpp?rev=216457&r1=216456&r2=216457&view=diff
>> ==============================================================================
>> --- cfe/trunk/unittests/AST/ASTVectorTest.cpp (original)
>> +++ cfe/trunk/unittests/AST/ASTVectorTest.cpp Tue Aug 26 09:17:25 2014
>> @@ -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);
>
> We have array_lengthof to use, rather than the hardcoded 4. Or use an
> ArrayRef instead of a std::vector, and it'll deduce the length
> automatically (and still has begin/end that'll be fine for the
> subsequent tests)

Good suggestion, I've switched to ArrayRef in r216463.

Thanks!

~Aaron
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to