Skip to content

Commit d0b54bb

Browse files
kiloalphaindiacor3ntin
authored andcommitted
[Clang] use unsigned integer constants in unit-test | fixes build error on ppc64le-lld-multistage-test
Fixes: /home/buildbots/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: warning: comparison of integer expressions of different signedness: ‘const unsigned int’ and ‘const int’ [-Wsign-compare] /home/buildbots/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: warning: comparison of integer expressions of different signedness: ‘const long unsigned int’ and ‘const int’ [-Wsign-compare] Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D156224
1 parent 0d12683 commit d0b54bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/unittests/libclang/LibclangTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ static_assert(true, message);
12201220
const char *Args[] = {"-xc++", "-std=c++26"};
12211221
ClangTU = clang_parseTranslationUnit(Index, fileName.c_str(), Args,
12221222
std::size(Args), nullptr, 0, TUFlags);
1223-
ASSERT_EQ(clang_getNumDiagnostics(ClangTU), 0);
1223+
ASSERT_EQ(clang_getNumDiagnostics(ClangTU), 0u);
12241224
std::optional<CXCursor> staticAssertCsr;
12251225
Traverse([&](CXCursor cursor, CXCursor parent) -> CXChildVisitResult {
12261226
if (cursor.kind == CXCursor_StaticAssert) {
@@ -1229,7 +1229,7 @@ static_assert(true, message);
12291229
return CXChildVisit_Continue;
12301230
});
12311231
ASSERT_TRUE(staticAssertCsr.has_value());
1232-
size_t argCnt = 0;
1232+
int argCnt = 0;
12331233
Traverse(*staticAssertCsr, [&argCnt](CXCursor cursor, CXCursor parent) {
12341234
switch (argCnt) {
12351235
case 0:

0 commit comments

Comments
 (0)