Previously we use the SmallVector(size_t Size, const T& Value) constructor
with a default constructed Value. This will copy construct every element
in the vector, but not all types can be copy constructed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Sounds good - I probably wouldn't mind slightly more in the test, like a check for size or something, but yeah, that'd be of minimal value.
llvm/unittests/ADT/SmallVectorTest.cpp | ||
---|---|---|
174–177 | This test broke the clang-ppc64-aix build at https://lab.llvm.org/buildbot/#/builders/214/builds/6761/steps/6/logs/stdio FAILED: unittests/ADT/CMakeFiles/ADTTests.dir/SmallVectorTest.cpp.o ... In file included from /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/ADT/SmallVectorTest.cpp:16: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare] if (lhs == rhs) { ~~~ ^ ~~~ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1553:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs); ^ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/ADT/SmallVectorTest.cpp:176:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here EXPECT_EQ(V.size(), 42); ^ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2027:54: note: expanded from macro 'EXPECT_EQ' EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2) ^ 1 error generated. |
clang-format not found in user’s local PATH; not linting file.