[PATCH] D147426: [SmallVector] Add an explicit SmallVector(size_t Size) constructor.
Thurston Dang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 16:36:38 PDT 2023
thurston added inline comments.
================
Comment at: llvm/unittests/ADT/SmallVectorTest.cpp:174-177
+TEST(SmallVectorTest, ConstructNonCopyableTest) {
+ SmallVector<NonCopyable, 0> V(42);
+ EXPECT_EQ(V.size(), 42);
+}
----------------
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.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147426/new/
https://reviews.llvm.org/D147426
More information about the llvm-commits
mailing list