aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/libclang/LibclangTest.cpp
diff options
context:
space:
mode:
authorKai Stierand <kai.stierand@swplusplus.de>2023-07-25 13:47:46 +0200
committerCorentin Jabot <corentinjabot@gmail.com>2023-07-25 13:58:30 +0200
commitd0b54bb50e5110a004b41fc06dadf3fee70834b7 (patch)
tree5ed4954c6d7a71ba450b897af8baab1534fca881 /clang/unittests/libclang/LibclangTest.cpp
parent0d12683046ca75fb08e285f4622f2af5c82609dc (diff)
downloadllvm-d0b54bb50e5110a004b41fc06dadf3fee70834b7.zip
llvm-d0b54bb50e5110a004b41fc06dadf3fee70834b7.tar.gz
llvm-d0b54bb50e5110a004b41fc06dadf3fee70834b7.tar.bz2
[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
Diffstat (limited to 'clang/unittests/libclang/LibclangTest.cpp')
-rw-r--r--clang/unittests/libclang/LibclangTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/libclang/LibclangTest.cpp b/clang/unittests/libclang/LibclangTest.cpp
index b1f6534..295706c 100644
--- a/clang/unittests/libclang/LibclangTest.cpp
+++ b/clang/unittests/libclang/LibclangTest.cpp
@@ -1220,7 +1220,7 @@ static_assert(true, message);
const char *Args[] = {"-xc++", "-std=c++26"};
ClangTU = clang_parseTranslationUnit(Index, fileName.c_str(), Args,
std::size(Args), nullptr, 0, TUFlags);
- ASSERT_EQ(clang_getNumDiagnostics(ClangTU), 0);
+ ASSERT_EQ(clang_getNumDiagnostics(ClangTU), 0u);
std::optional<CXCursor> staticAssertCsr;
Traverse([&](CXCursor cursor, CXCursor parent) -> CXChildVisitResult {
if (cursor.kind == CXCursor_StaticAssert) {
@@ -1229,7 +1229,7 @@ static_assert(true, message);
return CXChildVisit_Continue;
});
ASSERT_TRUE(staticAssertCsr.has_value());
- size_t argCnt = 0;
+ int argCnt = 0;
Traverse(*staticAssertCsr, [&argCnt](CXCursor cursor, CXCursor parent) {
switch (argCnt) {
case 0: